2017-03-21 4 views
0
 

    { 
     "123": { 
     "question": "Alert Me When Redmi 3S Available jan-18th 12 noon on FLIPKART.", 
     "answer": [ 
      "Battery is removable or non-removable?", 
      "NON-REMOVABLE ..... but powerful battery..." 
     ] 
     }, 
     "124": { 
     "question": "Can we use Jio SIM in this phone?", 
     "answer": [ 
      "Yeah of course\n", 
      "I don't think so it supports Jio sim card" 
     ] 
     }, 
     "125": { 
     "question": "Is MI note 4 supports 4G?", 
     "answer": [ 
      "Yeah of course\n", 
      "I don't think so it supports Jio sim card" 
     ] 
     } 
    } 

+1

[ 'for..in'] (https://developer.mozilla.org/en-US/ docs/Web/JavaScript/Leitfaden/Loops_and_iteration # für ... in_statement) – hindmost

Antwort

2

Sie können versuchen, diese eample zu durchqueren:

var jsonVar = /* Your JSON */; 
for (id in jsonVar) { 
    console.log(jsonVarp[id]); 
}