# Unnamed json result

**URL:** https://forums.fusetools.com/t/unnamed-json-result/3292
**Category:** How-to Discussions
**Created:** [February 11, 2016, 9:55am UTC](https://forums.fusetools.com/t/unnamed-json-result/3292 "2016-02-11T09:55:54Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mux213](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mux213/32/176_2.png) [@mux213](https://forums.fusetools.com/u/mux213)
#### Post date: [February 11, 2016, 9:55am UTC](https://forums.fusetools.com/t/unnamed-json-result/3292/1 "2016-02-11T09:55:54Z")

</div>

Hi All,

Dumb question, I’m (I think) successfully retreaving some JSON data from a server using fetch. The problem is that my JSON data doesn’t have a name for the container, it looks like this:

```auto
[
  {
    "Field1": "somedata",
    "Field2": "somemoredata"
  }, 
  {
    "Field1": "somedata",
    "Field2": "somemoredata"
  }
]

```

I’m assigning the resultset I’m retrieving to an observable and attempting to use a block like so:

```auto
<Each Items="{resultset}">
...
</Each>

```

Doesn’t seem to work. In the examples like [https://www.fusetools.com/examples/http-json](https://www.fusetools.com/examples/http-json) the result set is named and is included as:

```auto
<Each Items="{resultset.resultname}">
...
</Each>

```

No idea if this is my problem or not.

Also is there a way to output what I’ve fetched to the console so I can check it? So far if I output it I just get a bunch of: [object Object],[object Object],[object Object] things, suggests I’ve indeed fetched my resultset but doesn’t really tell me much more 🙂

---

<div class="post-metadata">

### Author: ![mux213](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mux213/32/176_2.png) [@mux213](https://forums.fusetools.com/u/mux213)
#### Post date: [February 11, 2016, 10:27am UTC](https://forums.fusetools.com/t/unnamed-json-result/3292/2 "2016-02-11T10:27:53Z")

</div>

Just a small amendum…

```auto
var resultset = Observable();

...
// in my fetch:

resultset.value = jsonresult;
console.log(JSON.stringify(resultset.value));
...

```

I can definately see my result set in the log so I’m pretty sure I’m fetching the data properly, no idea why I can’t display it yet:)

---

<div class="post-metadata">

### Author: ![Bjorn-Olav\_Strand](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bjorn-olav_strand/32/583_2.png) [@Bjorn-Olav\_Strand](https://forums.fusetools.com/u/Bjorn-Olav_Strand)
#### Post date: [February 11, 2016, 10:56am UTC](https://forums.fusetools.com/t/unnamed-json-result/3292/3 "2016-02-11T10:56:59Z")

</div>

For `<Each>` to work your Observable must have several values. You are setting the first value of your Observable to an array. Try

```auto
resultset.replaceAll(jsonresult);

```

---

<div class="post-metadata">

### Author: ![mux213](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mux213/32/176_2.png) [@mux213](https://forums.fusetools.com/u/mux213)
#### Post date: [February 11, 2016, 11:06am UTC](https://forums.fusetools.com/t/unnamed-json-result/3292/4 "2016-02-11T11:06:59Z")

</div>

Hey Bjorn,

Figured it be something along those lines. The replaceAll didn’t work but I did manage to get it to work like so:

```auto
for (var i in jsonresult) {
  resultset.add(jsonresult[i]);
};

```

Just need to clear my variable before hand as it now always appends on a reload but I’m getting close…

Not sure why the resultAll won’t work, does seem that should have done the trick.

Cheers,

Bas

---

<div class="post-metadata">

### Author: ![Bjorn-Olav\_Strand](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bjorn-olav_strand/32/583_2.png) [@Bjorn-Olav\_Strand](https://forums.fusetools.com/u/Bjorn-Olav_Strand)
#### Post date: [February 11, 2016, 11:10am UTC](https://forums.fusetools.com/t/unnamed-json-result/3292/5 "2016-02-11T11:10:06Z")

</div>

I agree that `replaceAll` should work. Maybe you can post a self-contained test-case so that we can reproduce the error? (Inline the json structure)

Try

```auto
resultset.value = jsonresult;
resultset.expand();

```

---

<div class="post-metadata">

### Author: ![mux213](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mux213/32/176_2.png) [@mux213](https://forums.fusetools.com/u/mux213)
#### Post date: [February 11, 2016, 11:15am UTC](https://forums.fusetools.com/t/unnamed-json-result/3292/6 "2016-02-11T11:15:14Z")

</div>

Hey Bjorn,

Nah same result interestingly enough.

It’s getting late this side of the world so I’m going to catch some z’s. I’ll see if I can get a simple example going tomorrow. Be good to know what I"m overlooking:)

Cheers for the help,

Bas
