node.js - Using var in nodejs to search a json file -


this question has answer here:

so im trying search json file tried , didn't return value.

var info = json.parse(body);                      // file website var itemforjson = item.market_hash_name;          // item name try use in json depitems[i].value = parseint(info.itemforjson);   // has number 

use parseint(info[itemforjson]) on last line.


Popular posts from this blog

node.js - How do I prevent MongoDB replica set from querying the primary? -

c# - Randomly pick a specific int from a 2D Array -

php - Angularjs http.delete is not working after deploying project on server -