javascript - Json first object is a *, how to get it? -
this question has answer here:
- unable access json property “-” dash 1 answer
if run:
$("#results ul").append(data.parse.langlinks.map(function(val){ return "<li>" + val.lang + "</li>" })); i correct values of lang need first object , doesn't have verbal naming has
*
so when try access val.* get:
uncaught syntaxerror: unexpected token *
access object this: val['*'] .
Comments
Post a Comment