问题
This is my object:
var charsObj = {"drive":{"status":"inprogress","data":"some data","history":"the text of my history"}}
function getNote(x) {
if ( x in charsObj) {
console.log(charsObj[x])
} else {
console.log('nothing', charsObj[x])
}
}
if I call getNote('drive')
it returns my object value as expected EXCEPT iOS returns 'nothing', undefined
.
How do I get this to work on iOS?
来源:https://stackoverflow.com/questions/26024488/get-object-value-by-property-reference-not-working-on-ios