js traverses all key of json object and obtains value according to dynamic key. of must see

  • 2021-08-03 08:15:25
  • OfStack

Examples are as follows:


var obj = {};
for(var k in obj) {
 
  // Traverse through objects, k That is key , obj[k] For the current k Corresponding value 
  console.log(obj[k]);
 
}

Related articles: