Lấy value từ json

by bvotcode

JavaScript

var input ={
    "property0": 1
  }
var key = 'property0';
var arr = input[key];
console.log(arr)