Monday 15 July 2013

How to get this jSON data from API with Javascript / AngularJS -


I am working with json, an API, and ajirs. I want to get the following data, but I will not know in advance how the keyword or date will be

  {"Landscape Gardening Middlesex": {"2015-02-12": {"Status "," Change ":" n / a "," class ":" gray "}," 2015-03-17 ": {" position ":" 0 "," change ":" n / a " "Square": "Gray"}}, "Landscape Gardening Staines": {"2015-02-12": {"Status": Zero, "Change": "n / a", "class": "Gray" "2015-03-17": {"Status": "94", "Change": "n / a", "class": "green"}}, "Landscape Gardening Surrey": {"2015- 02- 12 ": {" "Change": "change": "n / a", "class": "green"}, "2015-03-17": {"position": "0", "change" ":" N / a " "Class": "gray"}}  

} I can get it using AngularJS ng-repeat thanks.

Create a Javascript T object and place it somewhere ... you can always strip it Parsing it again

  var myJSON = {name: "bill", Skill: ["coding", "sleep" "food"], age: 25}; // This string can be stored anywhere, such as a string in mySQL; Var string = JSON.trinfar (marijasan); /// JSON obj var newJSON = Turn back to JSON.parse (string); Console.log (newJSON.name); // & gt; & Gt; "Bill"  

/// Hope that helps


No comments:

Post a Comment