Why my angular.forEach loop isn't working - json

I am not sure what's going wrong, cause it looks pretty straight forward to me. I have few things in my mind about appending the JSON response, but for that when I am trying to apply forEach loop to my Json , no data is shown in the alert
Angular code
mainApp.controller('MultiCarouselController', function($scope, $http) {
$scope.products = [];
$http.get("/get_broad_category_products/?BroadCategory=BroadCategory3")
.success(function (response) {
$scope.products = response;
angular.forEach(products,function(value,key){
alert(key+'----'+value); // can see this alerts
});
}).error(function(){
console.log('Error happened ... ');
});
});
My JSON response is some junk data of Products
[
{
"sku": "d1cd71a8-9dc5-4724-b269-473ede28a1d7",
"selectedQtyOptions": [],
"selectedSize": "",
"description": "foolish interpolates trumpet monographs ferried inboards Forster tike grammatically sunroof vaporizing Sweden demure retouching completely robbing readies unloose guiltless tatty unobservant cuffs fortieth wither rigorously paradoxically snowmobiling charts clenching planning dealing lesions bicameral pertly chaffinches grumpiness private purled insanely attainment proposal Fatima execrates pshaws chars actuators turboprop soughed kicking majors conquistadores Cynthia septuagenarians kneecaps titans attractions larvas invigorating trunking Shevat recluse Trina slenderness kinking falsified logistically hogged skyrocketing ordinal avoiding trademarked underfoot garter sacrificial pricey nosedive bachelors deiced heave dictatorial muffing prayed rewinding recopied limpidly Crichton conversion chitterlings signets Aiken Froissart turnoff snowshoe forded spiralled underwriters flourishes Sade splicer transfusions cesspools lifelike ruckus showering paean voguish Buck copings Russell watchdog magneto pored height zodiac motherland backings Venus obeys scooters nonintervention dinosaur unashamedly anathema hibernate consumerism portended worked mystically existentialist dissatisfies badgers unanimously triplicated Jenny sagacity Windex snoopier nonplusing shovelling Assam putty darn Sulawesi Italians gunnery codify develops rhinos upwards Louise welled experiences socks pinky mewed Camille claimants swirl squattest ware parenthetic bonitoes hydrangeas decolonizing omit skyjacks Gorky financiers province flywheel southeastward Bayeux updated yowl Tulsidas macintosh sprees pralines systolic uncommoner cilium tromping Asimov heinous cordoned combated camerawomen syndrome identified prizefights heavyweight vertically reflector integrity Hebrides sepulchral loner parrot smooths candidness",
"selectedQty": "1",
"title": "viragoes",
"brand": "Brand0",
"images": [
{
"image0": "/media/products/f791a316ced7b3b774bd61e138197224.jpg"
}
],
"sizeQtyPrice": [
{
"discountAttributes": "chinos theosophy misdemeanor irrigates school Pullman sombrely suspect vortex baddest",
"measureUnit": "ltr",
"discountPercent": 4,
"mrp": 3102,
"qty": 7,
"size": 66
},
{
"discountAttributes": "Molotov absurd traces pounces contracts clarions thighbone Hesse parricide constrains",
"measureUnit": "m",
"discountPercent": 16,
"mrp": 2773,
"qty": 7,
"size": 18
},
{
"discountAttributes": "detainment gunnysack vied expropriation unobtrusive collectables embracing poster hexing governess",
"measureUnit": "m",
"discountPercent": 6,
"mrp": 9920,
"qty": 6,
"size": 69
}
],
"id": 9
},
{
"sku": "838660bb-7ab9-4f2a-8be7-9602a5801756",
"selectedQtyOptions": [],
"selectedSize": "",
"description": "agreeing vizier bleariest trig appliquéing copulating commissariats Balzac lunchtimes glittery quacking Leoncavallo heehawing Tampax lizards pegged nanosecond centigrade subplots tumbrils give jawed skits nickel discontinues impinged evangelized Platonist waterlines dams symposiums intercessor cognition heavier softener dromedaries bravos immobilize consciously Clemons patch klutzier Kirkpatrick caddying designs Dulles twelfths undemocratic isolationists infected ma homering soliciting minibus pluralism fraternity catalyzed Scorpio pandemonium waxwing starter infuses rebuttals spirals rerunning interrogatories Manuel whomsoever tenderized conjoint baronesses callower parenthetic plusses extend cockier Fokker dewlap Cowper Swammerdam secs hock relaxations Judas Canadian presidency lo wildness Philippe picture beekeeper lull manuals transnational yaw chloroformed perennials distinctive Nottingham antiquaries underneath parted nervously basemen observatories scrubbed encoder egalitarians winnow caddish Hawaiians brownstones robbing exhaustible antagonist benefactresses Plasticine Peace platypi Guzman stippled shuts peacemakers butterfly Bolton grout McCain Lebanon bounce oleander Balkans endearments snowfall spoonerisms furnaces inequities billowy jutting guffaw beautifully penis newtons snuffboxes j Angelita tinkles literature depicts insouciant scribblers blinker disobediently devotees primordial sixties Kalamazoo shear contest classes cripple edging exactest cheat invocation thrived drunkenness Fuller architectures sprite Lillian constricts tucking chastisements walruses guzzlers rejoinder apprenticeships pillory spendthrift omens spoonful contortions precociously intensely motorway guts cahoot sculptor paralytics reminisce meltdown trusts lady pronghorn scurried Campbell micron flawing foals nigher",
"selectedQty": "1",
"title": "smokier",
"brand": "Brand2",
"images": [
{
"image0": "/media/products/f51a649e72694d23962ee77a97872f0e.jpg"
}
],
"sizeQtyPrice": [
{
"discountAttributes": "Beerbohm earldom Stanley seconding hypertension Sayers miserly epitome retires ditching",
"measureUnit": "m",
"discountPercent": 15,
"mrp": 5065,
"qty": 6,
"size": 83
},
{
"discountAttributes": "confine Newman bagel cornflower rears generator goaded midweeks drain cigarillo",
"measureUnit": "Kg",
"discountPercent": 12,
"mrp": 2284,
"qty": 9,
"size": 13
},
{
"discountAttributes": "eerier fizzes lessened rotisserie developer Gray industrial callused convergences ampoule",
"measureUnit": "gms",
"discountPercent": 4,
"mrp": 6816,
"qty": 8,
"size": 18
}
],
"id": 14
}
]

products isn't defined. It should be $scope.products

Related

how to load json and extract into separate nodes in neo4j

i'm newbie in neo4j and need help with my case...
i'm trying to load json file with the structure (updated by suggested) like below and extract into 3 nodes (big5_personality, personality_result & personality)
{
"big5_personality":[
{
"user_name":"Satu' Roy Nababan",
"preference":"MRT Jakarta",
"user_name_link":"https://www.facebook.com/satu.nababan",
"post_text_id":"[ \"was there,Berangkat kerja gelap pulang gelap selama 49 hari berturut-turut sebelum cuti 14 hari.,.,.,Tempat pertama belajar health and safety sbg seorang pefesional. Salah satu perusahaan dgn safety management system terbaik yg pernah saya temui.? See More\", \"Old normal: dominasi big four (Peter Gade, Lee Chong Wei, Taufik Hidayat, dan Lin Dan) akhirnya benar2 berakhir. Semuanya sudah pensiun.,New normal: saatnya para rising star memperebutkan dominasi atau membuat formasi big four versi new normal. Mereka yang sangat potensial saat ini; Kento Momota, Chou Thien Chen, Viktor Axelsen, Anders Antonsen, Anthony Ginting, Jonathan Christie, Lee Zii Jia.,#LinDan,#SuperDan,#Legend,#TwoT? See More\", \"#MenjemputRezeki Seri-4.,Ini adalah shipment ke-4 #Jengkiers dari Tanjung Balai ke Jakarta. Mumpung masih fresh dan stock ready lengkap, yuk mainkan!,#AyoMakanIkan,#I? See More\", \"The best version of Sabine Lisicki\", \"Naik #MRTTetapAman\", \"Terima kasih #MRTTetapAman\", \"#Jengkiers is back!,Kita kedatangan bbrp varian baru loh, seperti gabus asin, kerang, jengki putih belah, dll. Sok atuh langsung cek gambar yak, lengkap dengan PL dan kontaknya,#AyoMakanIkan,#IkanAsliTanjungBalai\", \"#CeritaGuruDiAtasGaris,#KakLiss,#GuruMantul\", \"Nih satu geng cuma bertiga doang sih, di WAG chatnya ngegas terus, ketemuan ngomongnya juga ga kalah ngegasss, tapi tetep aja pen ketemuan mulu meski banyakan dramanya utk cari jadwal yg pas,Thank you chit chat dan traktirannya woiii, enak bgt itu po*k nya, pen pesan lagi ah kapan2,#GroupHolanH,#Nama? See More\", \"Coming up next, Aldila Sutjiadi / Priska Madelyn Nugroho vs Jessy Rompies / Rifanty Dwi Kahfiani #ayotenis\", \"Beberapa cara lain menikmati produk #Jengkiers, bisa jadi nasi goreng teri medan atau mie gomak udang manis (slide 2-3),*monmaap klo teri dan udangnya ga terlalu terlihat, krn emang dikit aja ditaronya, klo kebanyakan rugi pedagang percaya ajalah disitu ada udang dan teri pokoknya,#AyoMakanIkan,#Ika? See More\", \"Thank you, Abang John Evendy Hutabarat utk waktunya, utk berbagi cerita dan pelajaran setelah sekian tahun ga ketemu secara fisik.\", \"Next match double antara duo punggawa Fed Cup ( Priska Madelyn Nugroho / Janice Tjen) vs petenis berpengalaman, Beatrice Gumulya duet dgn juniornya, Rifanty Dwi Kahfiani. Selamat menyaksikan,#ayotenis,#indonesiantennis\", \"Women single final antara 2 terbaik dalam babak round robin pekan lalu, Aldila Sutjiadi vs Jessy Rompies,#ayotenis,#indonesiantennis\", \"Here we go,Paket2 yg siap meluncur ke alamat para costumer setia #Jengkiers,Yuk j? See More\", \"Barang baru datang guys, unit ready pengiriman besok sore,Ada yg baru nih, terasi spesial, asli, didatangkan langsung dari Tg Balai, buat kalian penggemar sambal terasi sudah tentu tak mau kelewatan kan?\", \"INOVASI\", \"Federer's shots\", \"RIP Ibu Josephine Mekel (Ibunda Vokalis Once Mekel, Alumni UI, FH'89). Turut berdukacita utk Bung Once dan keluarga besar Mekel-Cambey.,Tadi malam utk pertama kalinya menghadiri acara kebaktian penghiburan sejak masa pandemik, tentu dgn protok kesehatan yg sangat ketat, jumlah yg hadir dibatasi termasuk kita yang nyanyi cuma berlima saja.\", \"Bagi yg sudah lama ga mampir kawasan MRT Dukuh Atas, nih ada yg baru loh,Totem terpasang dibanyak titik, serasa di luar negeri bukan?,#MRTJakarta\" ]",
"post_text_eng":"[ \"was there, leaving for dark work went home dark for 49 consecutive days before taking 14 days off ..., the first place to learn health and safety as a professional. One of the companies with the best safety management system I have ever met.? See More \", \"Old normal: the dominance of the big four (Peter Gade, Lee Chong Wei, Taufik Hidayat, and Lin Dan) has finally come to an end. Everything is retired., New normal: it's time for the rising stars to fight for domination or make a new version of the Big Four formation. with very potential right now: Kento Momota, Chou Thien Chen, Viktor Axelsen, Anders Antonsen, Anthony Ginting, Jonathan Christie, Lee Zii Jia., # LinDan, # SuperDan, # Legend, # TwoT? See More \", \"#Pick up the 4th Series Rezeki., This is the 4th shipment #Jengkiers from Tanjung Balai to Jakarta. While it's still fresh and ready stock, let's play!, # Come on Eat, # I? See More\", \"The best version of Sabine Lisicki\", \"Ride #MRTKeep Safe\", \"Thank you #MRTKeep Safe\", \"#Jengkiers is back !, We have a number of new variants, such as salted cork, clams, white jengki split, etc. Sok directly check yak pictures, complete with PL and contacts, # Come on Eat, # Ikan AsliTanjungBalai\", \"# Stories of Teachers On Top of Line, # KakLiss, # Teachers Bounce\", \"Here, one gang is only the three of them, on WAG chat, it keeps on firing, meeting and talking isn't too bad, but still just finding it, even though most of the drama is to find the right schedule, Thank you chit chat and treats wow, how nice is that po * Please, order again sometime, # GroupHolanH, # Name? See More \", \"Coming up next, Aldila Sutjiadi / Priska Madelyn Nugroho vs Jessy Rompies / Rifanty Dwi Kahfiani #ayotenis\", \"Some other ways to enjoy #Jengkiers products, can be Medan teri fried rice or sweet shrimp gomak noodles (slides 2-3), * monmaap if the anchovies and the shrimp are not too visible, because it is only a little in the menu, if most of the traders lose trust there there are shrimp and anchovies, \\\"Let's Eat, # Ika? See More\", \"Thank you, Brother John Evendy Hutabarat for his time, to share stories and lessons after years of not meeting him physically.\" \"Next match doubles between Fed Cup retainer duo (Priska Madelyn Nugroho / Janice Tjen) vs. experienced tennis player, Beatrice Gumulya duet with her junior, Rifanty Dwi Kahfiani. Happy watching, # ayotenis, # indonesiantennis\", \"Women singles final between the 2 best in the round robin round last week, Aldila Sutjiadi vs Jessy Rompies, # ayotenis, # indonesiantennis\", \"Here we go, Paket2 are ready to slide to the address of loyal customers # Jengkiers, let's see?\" More, \"New goods are coming, guys, the unit is ready for delivery tomorrow afternoon. There are new ones, special shrimp paste, original, imported directly from Tg Balai, for you fans of terasi sauce, of course you don't want to go too far right?\", \"INNOVATION\", \"Federer's shots\", \"RIP Mrs. Josephine Mekel (Mother of Vocalist Once Mekel, UI Alumni, FH'89). Also sorrowing for Bung Once and the Mekel-Cambey extended family, last night for the first time attending consolation conventions since the pandemic, of course with health protection very strict, the number of attendees is limited including those of us who sing only five of them. \", \"For those who haven't stopped in the Dukuh Atas MRT area, there are new ones, Totem is installed at many points, feels like overseas, right? # MRTJakarta\" ]",
"personality_result":[
{
"user_name_link":"https://www.facebook.com/satu.nababan",
"word_count":472,
"word_count_message":"There were 472 words in the input. We need a minimum of 600, preferably 1,200 or more, to compute statistically significant estimates",
"processed_language":"en",
"personality":[
{
"trait_id":"big5_openness",
"name":"Openness",
"category":"personality",
"percentile":0.029368278774753065,
"raw_score":0.6883050000463327,
"significant":true,
"children":[
{
"trait_id":"facet_adventurousness",
"name":"Adventurousness",
"category":"personality",
"percentile":0.3272995424004471,
"raw_score":0.4889059610578305,
"significant":true
},
{
"trait_id":"facet_artistic_interests",
"name":"Artistic interests",
"category":"personality",
"percentile":0.48276246519083293,
"raw_score":0.6631367244448523,
"significant":true
},
{
"trait_id":"facet_emotionality",
"name":"Emotionality",
"category":"personality",
"percentile":0.4573453643547154,
"raw_score":0.6438277579254967,
"significant":true
},
{
"trait_id":"facet_imagination",
"name":"Imagination",
"category":"personality",
"percentile":0.5606034995849714,
"raw_score":0.7424334257188285,
"significant":true
},
{
"trait_id":"facet_intellect",
"name":"Intellect",
"category":"personality",
"percentile":0.7374704343214584,
"raw_score":0.6366655478430054,
"significant":true
},
{
"trait_id":"facet_liberalism",
"name":"Authority-challenging",
"category":"personality",
"percentile":0.7808736715557572,
"raw_score":0.5552707231598478,
"significant":true
}
]
},
{
"trait_id":"big5_conscientiousness",
"name":"Conscientiousness",
"category":"personality",
"percentile":0.22939241684474615,
"raw_score":0.5934971632418898,
"significant":true,
"children":[
{
"trait_id":"facet_achievement_striving",
"name":"Achievement striving",
"category":"personality",
"percentile":0.2677419988694361,
"raw_score":0.655591077028367,
"significant":true
},
{
"trait_id":"facet_cautiousness",
"name":"Cautiousness",
"category":"personality",
"percentile":0.40904830424778305,
"raw_score":0.47795518572548,
"significant":true
},
{
"trait_id":"facet_dutifulness",
"name":"Dutifulness",
"category":"personality",
"percentile":0.164224436809277,
"raw_score":0.6349680810761815,
"significant":true
},
{
"trait_id":"facet_orderliness",
"name":"Orderliness",
"category":"personality",
"percentile":0.867165384494327,
"raw_score":0.530616236542301,
"significant":true
},
{
"trait_id":"facet_self_discipline",
"name":"Self-discipline",
"category":"personality",
"percentile":0.2026779873552365,
"raw_score":0.5310156326644194,
"significant":true
},
{
"trait_id":"facet_self_efficacy",
"name":"Self-efficacy",
"category":"personality",
"percentile":0.3023937616129415,
"raw_score":0.7348991796444799,
"significant":true
}
]
},
{
"trait_id":"big5_extraversion",
"name":"Extraversion",
"category":"personality",
"percentile":0.2667979477554203,
"raw_score":0.5232267972734429,
"significant":true,
"children":[
{
"trait_id":"facet_activity_level",
"name":"Activity level",
"category":"personality",
"percentile":0.3490192324295949,
"raw_score":0.5205273056390818,
"significant":true
},
{
"trait_id":"facet_assertiveness",
"name":"Assertiveness",
"category":"personality",
"percentile":0.3371249743821161,
"raw_score":0.6230467403390507,
"significant":true
},
{
"trait_id":"facet_cheerfulness",
"name":"Cheerfulness",
"category":"personality",
"percentile":0.24258354512261554,
"raw_score":0.594713504568435,
"significant":true
},
{
"trait_id":"facet_excitement_seeking",
"name":"Excitement-seeking",
"category":"personality",
"percentile":0.46972100101797953,
"raw_score":0.6003831372285343,
"significant":true
},
{
"trait_id":"facet_friendliness",
"name":"Outgoing",
"category":"personality",
"percentile":0.29192693589475666,
"raw_score":0.5330152232542364,
"significant":true
},
{
"trait_id":"facet_gregariousness",
"name":"Gregariousness",
"category":"personality",
"percentile":0.34577689008301526,
"raw_score":0.4329464839207155,
"significant":true
}
]
},
{
"trait_id":"big5_agreeableness",
"name":"Agreeableness",
"category":"personality",
"percentile":0.2778846312783998,
"raw_score":0.7187775451521589,
"significant":true,
"children":[
{
"trait_id":"facet_altruism",
"name":"Altruism",
"category":"personality",
"percentile":0.3340915482705341,
"raw_score":0.6900524000049065,
"significant":true
},
{
"trait_id":"facet_cooperation",
"name":"Cooperation",
"category":"personality",
"percentile":0.445551905959055,
"raw_score":0.5711407367161474,
"significant":true
},
{
"trait_id":"facet_modesty",
"name":"Modesty",
"category":"personality",
"percentile":0.5418929802964033,
"raw_score":0.4539269679292031,
"significant":true
},
{
"trait_id":"facet_morality",
"name":"Uncompromising",
"category":"personality",
"percentile":0.3327649613483089,
"raw_score":0.6054136547271408,
"significant":true
},
{
"trait_id":"facet_sympathy",
"name":"Sympathy",
"category":"personality",
"percentile":0.5776699806826077,
"raw_score":0.6709599083365048,
"significant":true
},
{
"trait_id":"facet_trust",
"name":"Trust",
"category":"personality",
"percentile":0.6506691562935983,
"raw_score":0.6017503767590401,
"significant":true
}
]
},
{
"trait_id":"big5_neuroticism",
"name":"Emotional range",
"category":"personality",
"percentile":0.012225596986201182,
"raw_score":0.3709704629886742,
"significant":true,
"children":[
{
"trait_id":"facet_anger",
"name":"Fiery",
"category":"personality",
"percentile":0.5581412468086754,
"raw_score":0.5437137741013285,
"significant":true
},
{
"trait_id":"facet_anxiety",
"name":"Prone to worry",
"category":"personality",
"percentile":0.7355932800664517,
"raw_score":0.6370636497177248,
"significant":true
},
{
"trait_id":"facet_depression",
"name":"Melancholy",
"category":"personality",
"percentile":0.8073480016353904,
"raw_score":0.5034267686780826,
"significant":true
},
{
"trait_id":"facet_immoderation",
"name":"Immoderation",
"category":"personality",
"percentile":0.24332416646800148,
"raw_score":0.47385528964341017,
"significant":true
},
{
"trait_id":"facet_self_consciousness",
"name":"Self-consciousness",
"category":"personality",
"percentile":0.7754603650051617,
"raw_score":0.5865448670864387,
"significant":true
},
{
"trait_id":"facet_vulnerability",
"name":"Susceptible to stress",
"category":"personality",
"percentile":0.7069366679699797,
"raw_score":0.5023098966625577,
"significant":true
}
]
}
],
"needs":[
{
"trait_id":"need_challenge",
"name":"Challenge",
"category":"needs",
"percentile":0.3111815824704851,
"raw_score":0.7096962589081414,
"significant":true
},
{
"trait_id":"need_closeness",
"name":"Closeness",
"category":"needs",
"percentile":0.35074889692132116,
"raw_score":0.776347669910458,
"significant":true
},
{
"trait_id":"need_curiosity",
"name":"Curiosity",
"category":"needs",
"percentile":0.31319024070209367,
"raw_score":0.8038374100057984,
"significant":true
},
{
"trait_id":"need_excitement",
"name":"Excitement",
"category":"needs",
"percentile":0.381914846033436,
"raw_score":0.6613380266802147,
"significant":true
},
{
"trait_id":"need_harmony",
"name":"Harmony",
"category":"needs",
"percentile":0.31267505503919857,
"raw_score":0.7923972251247591,
"significant":true
},
{
"trait_id":"need_ideal",
"name":"Ideal",
"category":"needs",
"percentile":0.3275871372890826,
"raw_score":0.6698318741171541,
"significant":true
},
{
"trait_id":"need_liberty",
"name":"Liberty",
"category":"needs",
"percentile":0.32239839981885254,
"raw_score":0.7192415822205642,
"significant":true
},
{
"trait_id":"need_love",
"name":"Love",
"category":"needs",
"percentile":0.3964120015403447,
"raw_score":0.7558832961971879,
"significant":true
},
{
"trait_id":"need_practicality",
"name":"Practicality",
"category":"needs",
"percentile":0.9649293870023881,
"raw_score":0.7669009397738932,
"significant":true
},
{
"trait_id":"need_self_expression",
"name":"Self-expression",
"category":"needs",
"percentile":0.6353593836964153,
"raw_score":0.6869779372404304,
"significant":true
},
{
"trait_id":"need_stability",
"name":"Stability",
"category":"needs",
"percentile":0.24020391881699688,
"raw_score":0.711976290266912,
"significant":true
},
{
"trait_id":"need_structure",
"name":"Structure",
"category":"needs",
"percentile":0.5035013183383961,
"raw_score":0.6963163749792464,
"significant":true
}
],
"warnings":[
{
"warning_id":"WORD_COUNT_MESSAGE",
"message":"There were 472 words in the input. We need a minimum of 600, preferably 1,200 or more, to compute statist"
}
]
}
],
"gender":"Male",
"marital_status":"Single",
"user_likes":"Jengkiers\r\nPriska Madelyn Nugroho\r\nMrs Laos World\r\nWimbledon\r\nKakliss MCI\r\nILUNI K3 FKM UI\r\nBadminton Vietnam\r\nBMT MEDIA\r\nTennis Indonesia\r\nRina Silvia Aritonang\r\nDina Maria Simamora\r\nIndustrial Hygiene\r\nChristopher Rungkat\r\nEffendi Hutahaean\r\nOya Yolanda Haam\r\nDigdyo Fakirul Gareng Crew\r\nShanty Sihombing\r\nPaulus Nalsali Herianto Tamba\r\nIndonesia Feminis\r\nIsna Muharyunis\r\nJoko Sumartono\r\nMRT Jakarta\r\nLagu Rohani Terbaru\r\nAldila Sutjiadi\r\nNurhalima Purba\r\nToro Prima Jaya\r\nHanif Optik Citra\r\nDarus Harjuniadi\r\nAtika Sumco\r\nMuhamad Yusuf Lamba\r\nMadinisafety Const\r\nRiri Gpp\r\nBethanie Mattek-Sands\r\nPenyet Everest\r\nSteve Harvey\r\nChoir \"Alumni Kristiani UI\"\r\nMartina Hingis\r\nGenie Bouchard\r\nBelinda Bencic\r\nLaLiga\r\nDr. Suryo Bawono, Sp.OG\r\nJoyful Choir Cibubur\r\nIMPORTIR.ORG\r\nIrwan Wahyudiono\r\nArdantya Syahreza\r\nBubuk Silky Puding\r\nEnglish For All Indonesian\r\nIIEF EduFair\r\nTAR Team BP Tangguh West Papua\r\nKang H Idea",
"location":"Depok",
"age_range":"31-35",
"education":"Bachelor"
}
]
}
i've tried to using this command, and successfully to create a node labeled big5_personality, but get stuck with 2 others.
WITH "///big5_personality.json" AS file
call apoc.load.json(file) YIELD value
unwind value.big5_personality as item
merge (a:big5_personality{user_name_link: item.user_name_link})
on create set
a.user_name = item.user_name,
a.preference = item.preferance,
a.gender = item.gender,
a.marital_status = item.marital_status,
a.education = item.education,
a.age_range = item.age_range,
a.location = item.location,
a.user_likes = item.user_likes,
a.post_text_id = item.post_text_id,
a.post_text_eng = item.post_text_eng,
a.identity = item.identity
foreach (personality_result in item.personality_result |
merge (b:personality_result {user_name_link: item.user_name_link})
on create set
b.word_count = personality_result.word_count,
b.word_count_message = personality_result.word_count_message,
b.processed_language = personality_result.processed_language
)
merge (a)-[r1:rel_personality_result]->(b)
foreach (personality in item.personality_result.personality |
merge (c:personality {user_name_link: b.user_name_link})
on create set
c.trait_id = personality.trait_id
MERGE (b)<-[:rel_personality]-(c)
)
please help
You have multiple issues with your data file. Among them are:
Your Cypher code expects personality_result to be a list of JSON objects. It is not.
(a) It is a single string, not a list.
(b) That string seems to consist of the truncated start of a stringified JSON object (that includes a lot of extra pretty-printing whitespace).
So, everything in your Cypher query starting at the FOREACH will not work.
In your next-to-last MERGE, personality_result.personality should probably be just personality.
You may have other issues, but it is hard to tell until you fix your data file and code.
i found the solution for my problem... maybe it's dirty way and there's better solution for my case... the updated code is below :
WITH "///big5_personality.json" AS file
call apoc.load.json(file) YIELD value
unwind value.big5_personality as item
unwind item.personality_result as itema
unwind itema.personality_detail as itemb
UNWIND itemb.children as itemc
merge (a:big5_personality{user_name_link: item.user_name_link})
on create set
a.user_name = item.user_name,
a.preference = item.preferance,
a.gender = item.gender,
a.marital_status = item.marital_status,
a.education = item.education,
a.age_range = item.age_range,
a.location = item.location,
a.user_likes = item.user_likes,
a.post_text_id = item.post_text_id,
a.post_text_eng = item.post_text_eng,
a.identity = item.identity
foreach (personality_result in itema |
merge (b:personality_result {user_name_link: item.user_name_link})
on create set
b.word_count = personality_result.word_count,
b.word_count_message = personality_result.word_count_message,
b.processed_language = personality_result.processed_language
)
merge (a)-[r1:rel_big5_personality_result{user_name_link: a.user_name_link, word_count: itema.word_count, word_count_message: itema.word_count_message, processed_language: itema.processed_language}]->(b)
foreach (trait in itemb |
merge (c:personality{user_name_link : item.user_name_link, trait_id: trait.trait_id, trait_name: trait.name, trait_category: trait.category, trait_percentile: trait.percentile, trait_significant: trait.significant})
ON CREATE SET
c.trait_raw_score = trait.raw_score
MERGE (b)-[:rel_personality_result{user_name_link : itema.user_name_link, trait_id: itemb.trait_id, trait_name: itemb.name, trait_category: itemb.category, trait_percentile: itemb.percentile, trait_significant: itemb.significant}]->(c)
)
FOREACH (facet IN itemc |
MERGE (d:personality_children{user_name_link : itema.user_name_link, personality_trait_id: itemb.trait_id})
ON CREATE SET
d.facet_trait_id = facet.trait_id,
d.facet_name = facet.name,
d.facet_category = facet.category,
d.facet_percentile = facet.percentile,
d.facet_significant = facet.significant
MERGE (c)-[:rel_personality_children{user_name_link : itema.user_name_link, personality_trait_id: itemb.trait_id, facet_trait_id: itemc.trait_id, facet_name: itemc.name, facet_category: itemc.category, facet_percentile: itemc.percentile, facet_significant: itemc.significant}]->(d)
)

Altering JSON Structure

So I am using a webscraper to pull information on sneakers from a website. The son data that comes back is structured like so
[
{
"web-scraper-order": "1554084909-97",
"web-scraper-start-url": "https://www.goat.com/sneakers",
"productlink": "$200AIR JORDAN 6 RETRO 'INFRARED' 2019",
"productlink-href": "https://www.goat.com/sneakers/air-jordan-6-retro-black-infrared-384664-060",
"name": "Air Jordan 6 Retro 'Infrared' 2019",
"price": "Buy New - $200",
"description": "The 2019 edition of the Air Jordan 6 Retro ‘Infrared’ is true to the original colorway, which Michael Jordan wore when he captured his first NBA title. Dressed primarily in black nubuck with a reflective 3M layer underneath, the mid-top features Infrared accents on the midsole, heel tab and lace lock. Nike Air branding adorns the heel and sockliner, an OG detail last seen on the 2000 retro.",
"releasedate": "2019-02-16",
"colorway": "Black/Infrared 23-Black",
"brand": "Air Jordan",
"designer": "Tinker Hatfield",
"technology": "Air",
"maincolor": "Black",
"silhouette": "Air Jordan 6",
"nickname": "Infrared",
"category": "lifestyle",
"image-src": "https://image.goat.com/crop/1250/attachments/product_template_additional_pictures/images/018/675/318/original/464372_01.jpg.jpeg"
},
{
"web-scraper-order": "1554084922-147",
"web-scraper-start-url": "https://www.goat.com/sneakers",
"productlink": "$190YEEZY BOOST 350 V2 'CREAM WHITE / TRIPLE WHITE'",
"productlink-href": "https://www.goat.com/sneakers/yeezy-boost-350-v2-cream-white-cp9366",
"name": "Yeezy Boost 350 V2 'Cream White / Triple White'",
"price": "Buy New - $220",
"description": "First released on April 29, 2017, the Yeezy Boost 350 V2 ‘Cream White’ combines a cream Primeknit upper with tonal cream SPLY 350 branding, and a translucent white midsole housing full-length Boost. Released again in October 2018, this retro helped fulfill Kanye West’s oft-repeated ‘YEEZYs for everyone’ Twitter mantra, as adidas organized the biggest drop in Yeezy history by promising pre-sale to anyone who signed up on the website. Similar to the first release, the ‘Triple White’ 2018 model features a Primeknit upper, a Boost midsole and custom adidas and Yeezy co-branding on the insole.",
"releasedate": "2017-04-29",
"colorway": "Cream White/Cream White/Core White",
"brand": "adidas",
"designer": "Kanye West",
"technology": "Boost",
"maincolor": "White",
"silhouette": "Yeezy Boost 350",
"nickname": "Cream White / Triple White",
"category": "lifestyle",
"image-src": "https://image.goat.com/crop/1250/attachments/product_template_additional_pictures/images/014/822/695/original/116662_03.jpg.jpeg"
},
However, I want to change it so that the top level node is sneakers and the next level down would be a specific sneaker brand ( Jordan, Nike, Adidas) and then the list of sneakers that belong to that brand. So my JSON structure would look something like this
Sneakers {
Adidas :{
[shoe1,
shoe2,
....
] },
Jordan: {
[shoe1,
shoe2,
....
]
}
}
I am not sure what tool I could use to do that. Any help would be greatly appreciated. All I have at the moment is the JSON file and it is not in the structure that I want it to be in.
One way of doing this would be to populate a dict whose keys are brand names and their values are lists of sneaker records. Assuming that data is your original list, here's the code:
sneakers_by_brand = {}
for record in data:
if sneakers_by_brand.get(record.get("brand")):
sneakers_by_brand[record.get("brand")].append(record)
else:
sneakers_by_brand[record.get("brand")] = [record]
print(sneakers_by_brand)

Error in fromJSON in R

I am trying to convert JSON file into data frame in R and had this error when I ran fromJSON in 'jsonlite' package.
Error in fromJSON(content, handler, default.size, depth, allowComments, :
Invalid JSON Node
I figured that the variable order are different in each row. In specific, for example, in the first row, "categories" is the second variable whereas it is the last variable in the third row (Please take a look at the data below). This is how the original JSON file is formatted, and I have several hundred thousand rows like this so can't manually change it.
Anyone can suggest how to fix this and successfully convert the JSON into data frame in R?
[{"asin": "0188399313", "categories": [["Baby"]], "description": "Wee-Go Glass baby bottles by LifeFactory (Babylife) are designed to grow with your child. The included clear cover can also serve as an easy to hold cup. Twist on the solid cap (sold separately) and use your bottles for storing juice or snacks. Perfect for a lunchbox or traveling. The bright colored silicone sleeve (patent pending) helps to protect the bottle from breakage and provides a great gripping surface and tactile experience during feeding. The bottle and sleeve can be boiled or put in the dishwasher together. They can also go in the freezer, making breast milk storage simple.", "title": "Lifefactory 4oz BPA Free Glass Baby Bottles - 4-pack-raspberry and Lilac", "price": 69.99, "imUrl": "http://ecx.images-amazon.com/images/I/41SwthpdD9L._SX300_.jpg", "brand": "Lifefactory", "related": {"also_bought": ["B002SG7K7A", "B003CJSXW8", "B004PW4186", "B002O3JH9Q", "B002O3NLIO", "B004HGSU28"], "also_viewed": ["B003CJSXW8", "B0052QOL1Q", "B004PW4186", "B00EN0OLZ8", "B00EN0OOQY", "B0049YS46K", "B00E64CBLM", "B00F9YOOS6", "B00AH9RPVQ", "B00BCU2R7G", "B002O3NLIO", "B008NZ4X2K", "B005NIDFEW", "B00DKPJCH4", "B00CZNGWWK", "B00DAKJIQ4", "B005CT55IQ", "B0049YRJM0", "B0071IEWD0", "B00E64CA68", "B00IUB3SKK", "B00A7AA6XY", "B001F50FFE", "B002HU9EO4", "B007HP11SQ", "B009WPUMX4", "B002O3JH9Q", "B00F2FT3K6", "B00I5CR35A", "B00BCTY5EK", "B002SG7K7A", "B00F2FLU2U", "B0062ZK0GQ", "B002UOFR66", "B0055LKQQ2", "B00A0FGN8I", "B00HMYCG2W", "B00DHFLUO0", "B0040HMPA2", "B00I5CT9XE", "B008B5MMNO", "B00BQYVNGO", "B00925WM28", "B00BGKC3EY", "B005Q3LSDO", "B0038JDVCE", "B0045I6IA4"], "bought_together": ["B002SG7K7A", "B003CJSXW8"], "buy_after_viewing": ["B003CJSXW8", "B0052QOL1Q", "B004PW4186", "B002SG7K7A"]},},
{"asin": "0188399518", "categories": [["Baby"]], "description": "The Planet Wise Flannel Wipes are 10 super soft, color coordinated, high-quality wipes that fit perfectly into the Planet Wise Wipe PouchTM.", "title": "Planetwise Flannel Wipes", "price": 15.95, "imUrl": "http://ecx.images-amazon.com/images/I/41otjnA4OGL._SY300_.jpg", "brand": "Planet Wise", "related": {"also_bought": ["B00G96N3YY", "B003XSEV2O", "B000138GNY", "B005WWIE3G", "B005WWI0DA", "B005WWIMGA", "B00DS4WPNK", "B0039VCRPI", "B001QIN6ME", "B004GMGLN8", "B00CJ2OWUG", "B004BDNJW8", "B003N0JXSO", "B003X3R6TO", "B002T5Q01C", "B006J2U4T0", "B00JBJDEC2", "B00380LVLG", "B00GJVM2NW", "B003AJHDQW", "B0043EDGP0", "B0012IJBUE", "B001OI0YWG", "B005DL5970", "B00305GSKS", "B00CQ9UUK8", "B002Y27PQ4", "B00AH8J448", "B00A3JXVZY", "B00483GAJU", "B001J6O6B8", "B0019ID6G2", "B005DL7LGM", "B00APSYDXM", "B004D5KJJA", "B0021HR94K", "0757302661", "B001HX4DNE"], "also_viewed": ["B000138GNY", "B00G96N3YY", "B006J2U4T0", "B00GLBR3C0", "B0039VCRPI", "B0012IJBUE", "B001IA2XGK", "B001R2L6PS", "B003X3R6TO", "B00DS4WPNK", "B005WWIE3G", "B004BDNJW8", "B005WWIMGA", "B005WWI0DA", "B003XSEV2O", "B004A5VGPE", "B004A5TTGC", "B00JBJDEC2", "B004GMGLN8", "B009W6PM9M", "B004RGL9I0", "B0040IWMTK", "B00J3C0XC6", "B00HO1HBC8", "B00G96N18M", "B00A3V0XDA", "B0032AMM9M", "B001QIN6ME", "B00A3V0XEY", "B00CIUAB40", "B00J3C0Y1G", "B005IPE0KI", "B00L0W5B7Y", "B00FZGLKQW", "B00HBYOE3W", "B004A5TT4O", "B00B6KS578", "B002HOQOMA", "B004G792KW", "B002UD6BZS", "B002XVRKHK", "B002HOQOUW", "B002UD6C1Q", "B00APSYDXM", "B00H07AZ42", "B002LZX2BG", "B00BFQVZNO", "B00EZKNVYS", "B00DCLYYJW", "B00AHG8H1Q", "B002QZ64T8", "B003N0JXSO", "B003AJHDQW", "B00DN9NW32", "B00CHPJ0I4", "B005WXMJUY", "B00D4LFC3W"], "bought_together": ["B00G96N3YY", "B003XSEV2O"], "buy_after_viewing": ["B000138GNY", "B006J2U4T0", "B00G96N3YY", "B005WWIMGA"]},},
{"asin": "0188399399", "description": "The Planet Wise Wipe PouchTM features our patent pending no-leak design so your wipes will stay moist and not wick into your diaper bag. Features a unique snap down design to eliminate wicking from the zipper area. Most standard size wipes will fit into our Wipe PouchTM perfectly! Pouches are made of the same high quality fabrics as our Wet Bags, this pouch will last and last. Pouches are anti-microbial too! After you are done with the baby years, keep this pouch to use for just about anything you need to transport: make-up, toiletries, anything. Made in the USA!", "title": "Planetwise Wipe Pouch", "price": 10.95, "imUrl": "http://ecx.images-amazon.com/images/I/61x8h9u6mxL._SY300_.jpg", "related": {"also_bought": ["B005WWI0DA", "B005WWIMGA", "B006J2U4T0", "B000138GNY", "B003XSEV2O", "B005WWIE3G", "B00DS4WPNK", "B0039VCRPI", "B003GSLCOG", "B0018B15FE", "B002MN3JY2"], "also_viewed": ["B005WWIMGA", "B00G96N3YY", "B00DAI76TC", "B0067GKHVS", "B005WWIE3G", "B004RGL9I0", "B000138GNY", "B00JBJDEC2", "B00CMCJ2AS", "B005WWI0DA", "B002UD6C16", "B00E401FVU", "B004GMGLN8", "B0012IJBUE", "B00BFQVZNO", "B006J2U4T0", "B000VV21G4", "B002HOQOUW", "B003X3R6TO", "B000GZJIVQ", "B0052AIF00", "B005GQ6606", "B003TZHCA4", "B001QIN6ME", "B003XSEV2O", "B00GLBR3C0", "B00DW9R03G", "B00J3C0XC6", "0188399542", "B00DQL6CIE", "B002UD6C1G", "B00A3V0XDA", "B0039VCRPI", "B00EZKNVYS", "B006QRFDHQ", "B00DS4WPNK", "B00CQ9UUK8", "B0087A2PKS", "B00GGNICSW", "B0037NXP18", "B000YCNLSC", "B00FJG945W", "B00FZGLKQW", "B004A5VGPE", "B00D4LFC3W", "B00G96N18M", "B00439UNR4", "B004A5TT4O", "B005DL7LGM", "B006SD2JUW", "B006Z6HXYY", "B006QRFDZI", "B00I0P7VYK", "B00AZWDM0I", "B000ZKHVMU", "B007799PGC", "B00H58UNMU", "B00JKUU3TE"], "buy_after_viewing": ["B005WWIMGA", "B00G96N3YY", "B00DAI76TC", "B0067GKHVS"]},, "categories": [["Baby"]]},
{"asin": "0316967297", "description": "Hand crafted set includes 1 full quilt (76x86 inches) and 2 standard shams (20x26 inches). Face cloth and fill are 100 natural cotton. Prewashed for out of the bag comfort. Hand crafted with embroidery. Machine washable. Made in China", "title": "Annas Dream Full Quilt with 2 Shams", "price": 109.95, "imUrl": "http://ecx.images-amazon.com/images/I/51%2BZ1%2BNeukL._SY300_.jpg", "related": {"also_viewed": ["B009LTER3W", "B00575TI5Q", "B004NSYYJI"], "buy_after_viewing": ["B009LTER3W", "B001MX5EE6", "B00575TI5Q", "B0029009TG"]},, "categories": [["Baby"]]},
{"asin": "0615447279", "categories": [["Baby"]], "description": "Thumbuddy To Love- The Binky Fairy helps children give up pacifier sucking without the fuss and tears. The adorable book comes with a matching Binky Fairy puppet and just like the Tooth Fairy, the book is read the night before so children understand where thier pacifiers will go. They awake to find an adorable Binky Fairy puppet under thier pillow knowing that the Binky Fairy came! Each book comes with a success chart and stickers. Winner of the PTPA Awards (Parent Tested, Parent Approved). Recommended for ages 2-4.", "title": "Stop Pacifier Sucking without tears with Thumbuddy To Love s Binky Fairy Puppet and Adorable Book", "price": 16.95, "imUrl": "http://ecx.images-amazon.com/images/I/51RKKENlq%2BL._SY300_.jpg", "brand": "", "related": {"also_bought": ["0979670004", "1601310234", "B005G172KE", "1575422573", "1905417896", "B0044D0HA2", "B001GQ2CPI"], "also_viewed": ["0979670004", "1575422573", "1493535943", "0615273645", "1601310234", "0992616727", "0615273793", "0763623644", "1907152962", "0992616719", "B0016ZX7AI", "0698400488", "1608442713", "0451416058", "1581176848", "B0072CTECY", "B005G172KE", "B0016P8K3W", "0375822704", "0979201004", "0961478020", "160131048X", "1572245859"], "bought_together": ["B005G172KE"], "buy_after_viewing": ["0979670004", "1575422573", "B005G172KE", "1493535943"]},}]

How can I sort JSON object?

I have been looking for this for a while now. I want to sort the JSON file following way:
{
"rss": {
"-version": "2.0",
"channel": {
"title": "pubmed: wonpil im",
"link": "https://www.ncbi.nlm.nih.gov/sites/entrez?cmd=Search&db=PubMed&term=wonpil%20im",
"description": "NCBI: db=pubmed; Term=wonpil im",
"language": "en-us",
"docs": "http://blogs.law.harvard.edu/tech/rss",
"ttl": "1440",
"image": {
"title": "NCBI pubmed",
"url": "https://www.ncbi.nlm.nih.gov/entrez/query/static/gifs/iconsml.gif",
"link": "https://www.ncbi.nlm.nih.gov/sites/entrez",
"description": "PubMed comprises more than millions of citations for biomedical literature from MEDLINE, life science journals, and online books. Citations may include links to full-text content from PubMed Central and publisher web sites."
},
"item": [
{
"title": "Modeling and simulation of bacterial outer membranes and interactions with membrane proteins.",
"link": "https://www.ncbi.nlm.nih.gov/pubmed/28157627?dopt=Abstract",
"description": "
<table border=\"0\" width=\"100%\"><tr><td align=\"left\"><img src=\"//www.ncbi.nlm.nih.gov/corehtml/query/egifs/http:--linkinghub.elsevier.com-ihub-images-PubMedLink.gif\" border=\"0\"/> </td><td align=\"right\">Related Articles</td></tr></table>
<p><b>Modeling and simulation of bacterial outer membranes and interactions with membrane proteins.</b></p>
<p>Curr Opin Struct Biol. 2017 Jan 31;43:131-140</p>
<p>Authors: Patel DS, Qi Y, Im W</p>
<p>Abstract<br/>
The outer membrane (OM) of Gram-negative bacteria is composed of phospholipids in the periplasmic leaflet and lipopolysaccharides (LPS) in the external leaflet, along with β-barrel OM proteins (OMPs) and lipidated periplasmic lipoproteins. As a defensive barrier to toxic compounds, an LPS molecule has high antigenic diversity and unique combination of OM-anchored lipid A with core oligosaccharides and O-antigen polysaccharides, creating dynamic protein-LPS and LPS-LPS interactions. Here, we review recent efforts on modeling and simulation of native-like bacterial OMs to explore structures, dynamics, and interactions of different OM components and their roles in transportation of ions, substrates, and antibiotics across the OM and accessibility of monoclonal antibodies (mAbs) to surface epitopes. Simulation studies attempting to provide insight into the structural basis for LPS transport and OMP insertion in the bacterial OM are also highlighted.<br/>
</p><p>PMID: 28157627 [PubMed - as supplied by publisher]</p>
",
"author": " Patel DS, Qi Y, Im W",
"category": "Curr Opin Struct Biol",
"guid": {
"-isPermaLink": "false",
"#text": "PubMed:28157627"
}
},
{
"title": "Refinement of OprH-LPS Interactions by Molecular Simulations.",
"link": "https://www.ncbi.nlm.nih.gov/pubmed/28122220?dopt=Abstract",
"description": "
<table border=\"0\" width=\"100%\"><tr><td align=\"left\"><img src=\"//www.ncbi.nlm.nih.gov/corehtml/query/egifs/http:--linkinghub.elsevier.com-ihub-images-cellhub.gif\" border=\"0\"/> </td><td align=\"right\">Related Articles</td></tr></table>
<p><b>Refinement of OprH-LPS Interactions by Molecular Simulations.</b></p>
<p>Biophys J. 2017 Jan 24;112(2):346-355</p>
<p>Authors: Lee J, Patel DS, Kucharska I, Tamm LK, Im W</p>
<p>Abstract<br/>
The outer membrane (OM) of Gram-negative bacteria is composed of lipopolysaccharide (LPS) in the outer leaflet and phospholipids in the inner leaflet. The outer membrane protein H (OprH) of Pseudomonas aeruginosa provides an increased stability to the OMs by directly interacting with LPS. Here we report the influence of various P. aeruginosa and, for comparison, Escherichia coli LPS environments on the physical properties of the OMs and OprH using all-atom molecular dynamics simulations. The simulations reveal that although the P. aeruginosa OMs are thinner hydrophobic bilayers than the E. coli OMs, which is expected from the difference in the acyl chain length of their lipid A, this effect is almost imperceptible around OprH due to a dynamically adjusted hydrophobic match between OprH and the OM. The structure and dynamics of the extracellular loops of OprH show distinct behaviors in different LPS environments. Including the O-antigen greatly reduces the flexibility of the OprH loops and increases the interactions between these loops and LPS. Furthermore, our study shows that the interactions between OprH and LPS mainly depend on the secondary structure of OprH and the chemical structure of LPS, resulting in distinctive patterns in different LPS environments.<br/>
</p><p>PMID: 28122220 [PubMed - in process]</p>
",
"author": " Lee J, Patel DS, Kucharska I, Tamm LK, Im W",
"category": "Biophys J",
"guid": {
"-isPermaLink": "false",
"#text": "PubMed:28122220"
}
},
{
"title": "CHARMM-GUI MDFF/xMDFF Utilizer for Molecular Dynamics Flexible Fitting Simulations in Various Environments.",
"link": "https://www.ncbi.nlm.nih.gov/pubmed/27936734?dopt=Abstract",
"description": "
<table border=\"0\" width=\"100%\"><tr><td align=\"left\"><img src=\"//www.ncbi.nlm.nih.gov/corehtml/query/egifs/http:--pubs.acs.org-images-pubmed-acspubs.jpg\" border=\"0\"/> </td><td align=\"right\">Related Articles</td></tr></table>
<p><b>CHARMM-GUI MDFF/xMDFF Utilizer for Molecular Dynamics Flexible Fitting Simulations in Various Environments.</b></p>
<p>J Phys Chem B. 2016 Dec 23;:</p>
<p>Authors: Qi Y, Lee J, Singharoy A, McGreevy R, Schulten K, Im W</p>
<p>Abstract<br/>
X-ray crystallography and cryo-electron microscopy are two popular methods for the structure determination of biological molecules. Atomic structures are derived through the fitting and refinement of an initial model into electron density maps constructed by both experiments. Two computational approaches, MDFF and xMDFF, have been developed to facilitate this process by integrating the experimental data with molecular dynamics simulation. However, the setup of an MDFF/xMDFF simulation requires knowledge of both experimental and computational methods, which is not straightforward for nonexpert users. In addition, sometimes it is desirable to include realistic environments, such as explicit solvent and lipid bilayers during the simulation, which poses another challenge even for expert users. To alleviate these difficulties, we have developed MDFF/xMDFF Utilizer in CHARMM-GUI that helps users to set up an MDFF/xMDFF simulation. The capability of MDFF/xMDFF Utilizer is greatly enhanced by integration with other CHARMM-GUI modules, including protein structure manipulation, a diverse set of lipid types, and all-atom CHARMM and coarse-grained PACE force fields. With this integration, various simulation environments are available for MDFF Utilizer (vacuum, implicit/explicit solvent, and bilayers) and xMDFF Utilizer (vacuum and solution). In this work, three examples are shown to demonstrate the usage of MDFF/xMDFF Utilizer.<br/>
</p><p>PMID: 27936734 [PubMed - as supplied by publisher]</p>
",
"author": " Qi Y, Lee J, Singharoy A, McGreevy R, Schulten K, Im W",
"category": "J Phys Chem B",
"guid": {
"-isPermaLink": "false",
"#text": "PubMed:27936734"
}
},
]
}
}
}
I want this to be sorted according to "PubMed" numbers following way:
{
"rss": {
"-version": "2.0",
"channel": {
"title": "pubmed: wonpil im",
"link": "https://www.ncbi.nlm.nih.gov/sites/entrez?cmd=Search&db=PubMed&term=wonpil%20im",
"description": "NCBI: db=pubmed; Term=wonpil im",
"language": "en-us",
"docs": "http://blogs.law.harvard.edu/tech/rss",
"ttl": "1440",
"image": {
"title": "NCBI pubmed",
"url": "https://www.ncbi.nlm.nih.gov/entrez/query/static/gifs/iconsml.gif",
"link": "https://www.ncbi.nlm.nih.gov/sites/entrez",
"description": "PubMed comprises more than millions of citations for biomedical literature from MEDLINE, life science journals, and online books. Citations may include links to full-text content from PubMed Central and publisher web sites."
},
"item": [
{
"title": "CHARMM-GUI MDFF/xMDFF Utilizer for Molecular Dynamics Flexible Fitting Simulations in Various Environments.",
"link": "https://www.ncbi.nlm.nih.gov/pubmed/27936734?dopt=Abstract",
"description": "
<table border=\"0\" width=\"100%\"><tr><td align=\"left\"><img src=\"//www.ncbi.nlm.nih.gov/corehtml/query/egifs/http:--pubs.acs.org-images-pubmed-acspubs.jpg\" border=\"0\"/> </td><td align=\"right\">Related Articles</td></tr></table>
<p><b>CHARMM-GUI MDFF/xMDFF Utilizer for Molecular Dynamics Flexible Fitting Simulations in Various Environments.</b></p>
<p>J Phys Chem B. 2016 Dec 23;:</p>
<p>Authors: Qi Y, Lee J, Singharoy A, McGreevy R, Schulten K, Im W</p>
<p>Abstract<br/>
X-ray crystallography and cryo-electron microscopy are two popular methods for the structure determination of biological molecules. Atomic structures are derived through the fitting and refinement of an initial model into electron density maps constructed by both experiments. Two computational approaches, MDFF and xMDFF, have been developed to facilitate this process by integrating the experimental data with molecular dynamics simulation. However, the setup of an MDFF/xMDFF simulation requires knowledge of both experimental and computational methods, which is not straightforward for nonexpert users. In addition, sometimes it is desirable to include realistic environments, such as explicit solvent and lipid bilayers during the simulation, which poses another challenge even for expert users. To alleviate these difficulties, we have developed MDFF/xMDFF Utilizer in CHARMM-GUI that helps users to set up an MDFF/xMDFF simulation. The capability of MDFF/xMDFF Utilizer is greatly enhanced by integration with other CHARMM-GUI modules, including protein structure manipulation, a diverse set of lipid types, and all-atom CHARMM and coarse-grained PACE force fields. With this integration, various simulation environments are available for MDFF Utilizer (vacuum, implicit/explicit solvent, and bilayers) and xMDFF Utilizer (vacuum and solution). In this work, three examples are shown to demonstrate the usage of MDFF/xMDFF Utilizer.<br/>
</p><p>PMID: 27936734 [PubMed - as supplied by publisher]</p>
",
"author": " Qi Y, Lee J, Singharoy A, McGreevy R, Schulten K, Im W",
"category": "J Phys Chem B",
"guid": {
"-isPermaLink": "false",
"#text": "PubMed:27936734"
}
},
{
"title": "Modeling and simulation of bacterial outer membranes and interactions with membrane proteins.",
"link": "https://www.ncbi.nlm.nih.gov/pubmed/28157627?dopt=Abstract",
"description": "
<table border=\"0\" width=\"100%\"><tr><td align=\"left\"><img src=\"//www.ncbi.nlm.nih.gov/corehtml/query/egifs/http:--linkinghub.elsevier.com-ihub-images-PubMedLink.gif\" border=\"0\"/> </td><td align=\"right\">Related Articles</td></tr></table>
<p><b>Modeling and simulation of bacterial outer membranes and interactions with membrane proteins.</b></p>
<p>Curr Opin Struct Biol. 2017 Jan 31;43:131-140</p>
<p>Authors: Patel DS, Qi Y, Im W</p>
<p>Abstract<br/>
The outer membrane (OM) of Gram-negative bacteria is composed of phospholipids in the periplasmic leaflet and lipopolysaccharides (LPS) in the external leaflet, along with β-barrel OM proteins (OMPs) and lipidated periplasmic lipoproteins. As a defensive barrier to toxic compounds, an LPS molecule has high antigenic diversity and unique combination of OM-anchored lipid A with core oligosaccharides and O-antigen polysaccharides, creating dynamic protein-LPS and LPS-LPS interactions. Here, we review recent efforts on modeling and simulation of native-like bacterial OMs to explore structures, dynamics, and interactions of different OM components and their roles in transportation of ions, substrates, and antibiotics across the OM and accessibility of monoclonal antibodies (mAbs) to surface epitopes. Simulation studies attempting to provide insight into the structural basis for LPS transport and OMP insertion in the bacterial OM are also highlighted.<br/>
</p><p>PMID: 28157627 [PubMed - as supplied by publisher]</p>
",
"author": " Patel DS, Qi Y, Im W",
"category": "Curr Opin Struct Biol",
"guid": {
"-isPermaLink": "false",
"#text": "PubMed:28157627"
}
},
{
"title": "Refinement of OprH-LPS Interactions by Molecular Simulations.",
"link": "https://www.ncbi.nlm.nih.gov/pubmed/28122220?dopt=Abstract",
"description": "
<table border=\"0\" width=\"100%\"><tr><td align=\"left\"><img src=\"//www.ncbi.nlm.nih.gov/corehtml/query/egifs/http:--linkinghub.elsevier.com-ihub-images-cellhub.gif\" border=\"0\"/> </td><td align=\"right\">Related Articles</td></tr></table>
<p><b>Refinement of OprH-LPS Interactions by Molecular Simulations.</b></p>
<p>Biophys J. 2017 Jan 24;112(2):346-355</p>
<p>Authors: Lee J, Patel DS, Kucharska I, Tamm LK, Im W</p>
<p>Abstract<br/>
The outer membrane (OM) of Gram-negative bacteria is composed of lipopolysaccharide (LPS) in the outer leaflet and phospholipids in the inner leaflet. The outer membrane protein H (OprH) of Pseudomonas aeruginosa provides an increased stability to the OMs by directly interacting with LPS. Here we report the influence of various P. aeruginosa and, for comparison, Escherichia coli LPS environments on the physical properties of the OMs and OprH using all-atom molecular dynamics simulations. The simulations reveal that although the P. aeruginosa OMs are thinner hydrophobic bilayers than the E. coli OMs, which is expected from the difference in the acyl chain length of their lipid A, this effect is almost imperceptible around OprH due to a dynamically adjusted hydrophobic match between OprH and the OM. The structure and dynamics of the extracellular loops of OprH show distinct behaviors in different LPS environments. Including the O-antigen greatly reduces the flexibility of the OprH loops and increases the interactions between these loops and LPS. Furthermore, our study shows that the interactions between OprH and LPS mainly depend on the secondary structure of OprH and the chemical structure of LPS, resulting in distinctive patterns in different LPS environments.<br/>
</p><p>PMID: 28122220 [PubMed - in process]</p>
",
"author": " Lee J, Patel DS, Kucharska I, Tamm LK, Im W",
"category": "Biophys J",
"guid": {
"-isPermaLink": "false",
"#text": "PubMed:28122220"
}
},
]
}
}
}
Which is simply sorting according to given "#text": "PubMed:28122220". I would appreciate if anyone can help.

How to split very large JSON file in R?

I am currently working with Amazon User Metadata of size roughly around 9 GB. I have this data in .json format and want to read in R, due to such huge volume of data I want to divide the files in small chunks (either by size or by number of elements). If you can help me out how can I do this in R. The format of file is as follows:
{
"asin": "0000031852",
"title": "Girls Ballet Tutu Zebra Hot Pink",
"price": 3.17,
"imUrl": "http://ecx.images-amazon.com/images/I/51fAmVkTbyL._SY300_.jpg",
"related":
{
"also_bought": ["B00JHONN1S", "B002BZX8Z6", "B00D2K1M3O", "0000031909", "B00613WDTQ", "B00D0WDS9A", "B00D0GCI8S", "0000031895", "B003AVKOP2", "B003AVEU6G", "B003IEDM9Q", "B002R0FA24", "B00D23MC6W", "B00D2K0PA0", "B00538F5OK", "B00CEV86I6", "B002R0FABA", "B00D10CLVW", "B003AVNY6I", "B002GZGI4E", "B001T9NUFS", "B002R0F7FE", "B00E1YRI4C", "B008UBQZKU", "B00D103F8U", "B007R2RM8W"],
"also_viewed": ["B002BZX8Z6", "B00JHONN1S", "B008F0SU0Y", "B00D23MC6W", "B00AFDOPDA", "B00E1YRI4C", "B002GZGI4E", "B003AVKOP2", "B00D9C1WBM", "B00CEV8366", "B00CEUX0D8", "B0079ME3KU", "B00CEUWY8K", "B004FOEEHC", "0000031895", "B00BC4GY9Y", "B003XRKA7A", "B00K18LKX2", "B00EM7KAG6", "B00AMQ17JA", "B00D9C32NI", "B002C3Y6WG", "B00JLL4L5Y", "B003AVNY6I", "B008UBQZKU", "B00D0WDS9A", "B00613WDTQ", "B00538F5OK", "B005C4Y4F6", "B004LHZ1NY", "B00CPHX76U", "B00CEUWUZC", "B00IJVASUE", "B00GOR07RE", "B00J2GTM0W", "B00JHNSNSM", "B003IEDM9Q", "B00CYBU84G", "B008VV8NSQ", "B00CYBULSO", "B00I2UHSZA", "B005F50FXC", "B007LCQI3S", "B00DP68AVW", "B009RXWNSI", "B003AVEU6G", "B00HSOJB9M", "B00EHAGZNA", "B0046W9T8C", "B00E79VW6Q", "B00D10CLVW", "B00B0AVO54", "B00E95LC8Q", "B00GOR92SO", "B007ZN5Y56", "B00AL2569W", "B00B608000", "B008F0SMUC", "B00BFXLZ8M"],
"bought_together": ["B002BZX8Z6"]
},
"salesRank": {"Toys & Games": 211836},
"brand": "Coxlures",
"categories": [["Sports & Outdoors", "Other Sports", "Dance"]]
}