# JSON Accessing in Ionic 3

**URL:** <https://forum.ionicframework.com/t/json-accessing-in-ionic-3/145459>\
**Category:** ionic-v3\
**Created:** [October 23, 2018, 11:45pm UTC](https://forum.ionicframework.com/t/json-accessing-in-ionic-3/145459 "2018-10-23T23:45:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![technicus](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/technicus/32/87890_2.png) [@technicus](https://forum.ionicframework.com/u/technicus)\
**Post date:** [October 23, 2018, 11:45pm UTC](https://forum.ionicframework.com/t/json-accessing-in-ionic-3/145459/1 "2018-10-23T23:45:27Z")

</div>

Hello There

I have a json data which is like this:-

```
"0": {
    "id": 1,
    "name": "intra",
    "created_at": "2018-02-23 09:02:07",
    "updated_at": "2018-02-23 09:02:07"
},
"1": {
    "id": 2,
    "name": "Protein Blends",
    "created_at": "2018-02-23 09:02:33",
    "updated_at": "2018-02-23 09:02:33"
},
"2": {
    "id": 3,
    "name": "Protein Blends",
    "created_at": "2018-02-23 09:03:36",
    "updated_at": "2018-02-23 09:03:36"
}

```

}

i got this data via api but in html i am not able to travese the as i want to print the name only

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [October 24, 2018, 2:29am UTC](https://forum.ionicframework.com/t/json-accessing-in-ionic-3/145459/2 "2018-10-24T02:29:59Z")

</div>

If by “traverse” you mean `ngFor`, you’ll need to convert this object into an array.

---

<div class="post-metadata">

**Author:** ![technicus](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/technicus/32/87890_2.png) [@technicus](https://forum.ionicframework.com/u/technicus)\
**Post date:** [October 24, 2018, 2:31am UTC](https://forum.ionicframework.com/t/json-accessing-in-ionic-3/145459/3 "2018-10-24T02:31:49Z")

</div>

Hey thanks for the reply. but not able to convert in to array. can you please let me know how it works.  
@rapropos

---

<div class="post-metadata">

**Author:** ![maruti](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/maruti/32/103634_2.png) [@maruti](https://forum.ionicframework.com/u/maruti)\
**Post date:** [October 24, 2018, 4:19am UTC](https://forum.ionicframework.com/t/json-accessing-in-ionic-3/145459/4 "2018-10-24T04:19:39Z")

</div>

If you are familiar with [underscore](https://underscorejs.org/#values) library, you can use the below code to get only values in array and traverse using `ngFor`

```auto
_.values({one: 1, two: 2, three: 3});
=> [1, 2, 3]

```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:12pm UTC](https://forum.ionicframework.com/t/json-accessing-in-ionic-3/145459/5 "2021-07-19T21:12:23Z")

</div>

Closed on July 19, 2021, 9:12pm UTC


