parsing - Parse data from JSON in ReactJS -


i have data this:

{   "movies": [     {       "abridged_cast": [         {           "characters": [             "dominic toretto"           ],           "id": "162652472",           "name": "vin diesel"         },         {           "characters": [             "brian o'conner"           ],           "id": "162654234",           "name": "paul walker"         },         {           "characters": [             "louie tran"           ],           "id": "162684066",           "name": "tony jaa"         },         {           "characters": [             "deckard shaw"           ],           "id": "162653720",           "name": "jason statham"         },         {           "characters": [             "luke hobbs"           ],           "id": "770893686",           "name": "dwayne \"the rock\" johnson"         }       ],       "alternate_ids": {         "imdb": "2820852"       },       "critics_consensus": "",       "id": "771354922",       "links": {         "alternate": "http://www.rottentomatoes.com/m/furious_7/",         "cast": "http://api.rottentomatoes.com/api/public/v1.0/movies/771354922/cast.json",         "reviews": "http://api.rottentomatoes.com/api/public/v1.0/movies/771354922/reviews.json",         "self": "http://api.rottentomatoes.com/api/public/v1.0/movies/771354922.json",         "similar": "http://api.rottentomatoes.com/api/public/v1.0/movies/771354922/similar.json"       },       "mpaa_rating": "pg-13",       "posters": {         "detailed": "http://resizing.flixster.com/pvdoql2vctznnu0t6z0eule5g_c=/51x81/dkpu1ddg7pbsk.cloudfront.net/movie/11/18/14/11181482_ori.jpg",         "original": "http://resizing.flixster.com/pvdoql2vctznnu0t6z0eule5g_c=/51x81/dkpu1ddg7pbsk.cloudfront.net/movie/11/18/14/11181482_ori.jpg",         "profile": "http://resizing.flixster.com/pvdoql2vctznnu0t6z0eule5g_c=/51x81/dkpu1ddg7pbsk.cloudfront.net/movie/11/18/14/11181482_ori.jpg",         "thumbnail": "http://resizing.flixster.com/pvdoql2vctznnu0t6z0eule5g_c=/51x81/dkpu1ddg7pbsk.cloudfront.net/movie/11/18/14/11181482_ori.jpg"       },       "ratings": {         "audience_rating": "upright",         "audience_score": 88,         "critics_rating": "certified fresh",         "critics_score": 82       },       "release_dates": {         "theater": "2015-04-03"       },       "runtime": 140,       "synopsis": "continuing global exploits in unstoppable franchise built on speed, vin diesel, paul walker , dwayne johnson lead returning cast of fast & furious 7. james wan directs chapter of hugely successful series welcomes favorites michelle rodriguez, jordana brewster, tyrese gibson, chris \"ludacris\" bridges, elsa pataky , lucas black. joined international action stars new franchise including jason statham, djimon hounsou, tony jaa, ronda rousey , kurt russell.",       "title": "furious 7",       "year": 2015     }   ] } 

i need parse data fields json file. there way in react js? please suggest me way parse data structured json file this?

react lives in javascript. parsing json string done with:

var myobject = json.parse(myjsonstring); 

how fetch file somewhere ajax different question.

you use fetch() this. see example
https://developer.mozilla.org/en-us/docs/web/api/fetch_api or
https://davidwalsh.name/fetch or
https://blog.gospodarets.com/fetch_in_action


Comments