Convert JSON into array dataType
- by Myhome Stories
I have the following JSON string
var json = {"result":[{"address":" Ardenham Court, Oxford Road ,AYLESBURY, BUCKINGHAMSHIRE ,UNITED KINGDOM","picture":"1.jpg","uniqueid":"8b54275a60088547d473d462763b4738","story":"I love my home. I feel safe, I am comfortable and I am loved. A home can't be a home without our parents and our loved ones. But sad to say, some are experiencing that eventhough their loved ones are in their houses, they are not loving each other. There is a big war. You can't call it a home."}]}
I want to get address ,picture,story separately
for accomplish this. I tried recent answers in stackoverflow, but I was not able to achieve it.
Below is what I have tried,
$.each(json.result.address, function (index, value) {
// Get the items
var items = this.address; // Here 'this' points to a 'group' in 'groups'
// Iterate through items.
$.each(items, function () {
console.log(this.text); // Here 'this' points to an 'item' in 'items'
});
});