0

So im trying to search a json file but i tried this and it didn't return a value.

var info = JSON.parse(body);                      // Get File From Website
var itemforjson = item.market_hash_name;          // Get The Item Name To Try To Use It In Json
depitems[i].value = parseInt(info.itemforjson);   // Has To Be A Number
16austin16
  • 17
  • 9

1 Answers1

2

Use parseInt(info[itemforjson]) on the last line.

Russbear
  • 1,261
  • 1
  • 11
  • 22