H
himoo
Unregistered / Unconfirmed
GUEST, unregistred user!
使用 LkJSON v1.06 解析json时候出的问题。请大家帮忙。字符串如下:{"farmlandStatus":[{"a":15,"b":6,"c":0,"d":0,"e":1,"f":0,"g":0,"h":1,"i":100,"j":1,"k":26,"l":15,"m":15,"n":{"227554197":1,"276748590":1,"239255726":1,"238907507":1,"241702041":1,"250742092":1,"268702762":1,"237278654":1,"230021050":1,"260507944":1,"264453468":1},"o":0,"p":[],"q":1249911384,"r":1250141784,"s":0,"t":0,"u":0},{"a":15,"b":6,"c":0,"d":0,"e":1,"f":0,"g":0,"h":1,"i":100,"j":1,"k":28,"l":16,"m":16,"n":{"227554197":1,"276748590":1,"239255726":1,"238907507":1,"241702041":1,"250742092":1,"268702762":1,"237278654":1,"230021050":1,"260507944":1},"o":0,"p":[],"q":1249911384,"r":1250141784,"s":0,"t":0,"u":0}],"items":{"1":{"itemId":1},"2":{"itemId":2},"4":{"itemId":"4"},"3":{"itemId":"3"}},"exp":19661}farmlandStatus下有个数组,只拿第一个说吧。里面有个n值,也是数组:"n":{"227554197":1,"276748590":1,"239255726":1,"238907507":1,"241702041":1,"250742092":1,"268702762":1,"237278654":1,"230021050":1,"260507944":1,"264453468":1}此时,我不想得到Value值,只想得到Aname的值,比如227554197,因为这些值是不固定的。那个单元里有没有对应的啊?我发现有一个NameOf的方法,但是只能用在js := TlkJSON.ParseText(HtmlString) as TlkJSONobject;js.nameof(integer);而不能这样用:js.Field['farmlandStatus'].Child[0].Field['n'].NameOf[0]请问还有什么办法么?