在React Native中,如何将[Object Object]转换为键-值对数组[]

时间:2019-01-24 09:13:33

标签: arrays react-native object

userId包含

[object Object],[object Object],[object Object],[object Object]

我想将上述内容转换为数组。userId实际上包含如下内容。

[{"user_id":"aaa@gmail.com","slno":1}, 
{"user_id":"bbb@gmail.com","slno":2}, 
{"user_id":"cccc@gmail.com","slno":3}, 
{"user_id":"ddd@gmail.com","slno":4}] 

0 个答案:

没有答案