Looping JSON Array

HI all first of all thanks a lot for bug fixes on version 0.36 . I have a problem looping an array returned by a webservice, my webservice returns a JSON array not a json object but it seems that I can’t loop through a json Array, here is the webService link:

Here is javaScript code:

Which I am using xhr to fetch result as I have no idea why fetch is not working properly

var Observable = require("FuseJS/Observable")

var storesList = Observable();

/* fetch('')
.then(function(response) { return response.json(); })
.then(function(responseObject) { 
   storesList.value  = responseObject;    

var xhr = new XMLHttpRequest();

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {

    storesList.value = this.responseText;

xhr.open("GET", "");



And in the Ux file I have:

<Page ux:Class="StoresPage">
<Router ux:Dependency="router" />
<JavaScript File="StoresPage.js" />

<Each Items="{storesList}">
<Panel HitTestMode="LocalVisualAndChildren" >
<Grid RowCount="2">
        <Rectangle Row="1"><Text Value="{id}" /></Rectangle>
        <Rectangle Row="2"><Text Value="{name}" /></Rectangle>

But I see Nothing in my page.
I would be pleased if you let me know what is wrong.

referring to observable.value means you’re accessing its 0th element.
Each expects an observable collection, not a single-value observable that contains an array in its 0th element (provided your webservice returns an array).

Exchange storesList.value = this.responseText; with storesList.replaceAll(this.responseText); and see if that helps.

1 Like

Thanks a lot Uldis, just in case that someone else has the same issue I changed it to the following to work properly