Hi Corona community,
I use mod_pars by develephant, but I think my question is general and it has nothing to do with parse
this is the print statement :
[lua]local t = event.response.results
print( #t )[/lua]
and here’s what is printed in the console :
Aug 19 01:48:23.188: response: Aug 19 01:48:23.188: results: Aug 19 01:48:23.188: 1: Aug 19 01:48:23.188: createdAt: 2015-08-15T16:41:08.445Z Aug 19 01:48:23.188: objectId: 6qrED6IZ3W Aug 19 01:48:23.188: player: Aug 19 01:48:23.188: \_\_type: Pointer Aug 19 01:48:23.189: className: \_User Aug 19 01:48:23.189: objectId: g5hl75tjST Aug 19 01:48:23.189: score: 12365 Aug 19 01:48:23.189: updatedAt: 2015-08-15T16:41:08.835Z Aug 19 01:48:23.189: 1
now as you see, there’s the objectId and the score in the player section. I want to print only the score
I tried doing something like this :
[lua]print(#t[1][objectId])
–or
print(#t[1][score])[/lua]
but I get runtime error !
how can I print things correctly ?
thanks.