2016-01-20 123 views
0

如果我有作爲JSON對象存儲在Parse.com上的數據,是否可以查詢到它?例如,我有一欄「主題」存儲爲對象數據:Parse.com查詢JSON對象

{ 
    "type": "cal", 
    "action": "add", 
    "id": "123" 
} 

我想查詢匹配subject.type = "cal"記錄。可能嗎?

回答

0
String subname = "\"type\": \"cal\"";  
String[] names = {subname}; 
query.whereContainedIn("columnname", Arrays.asList(names)); 

你可以使用上面的代碼來幫助你在json中找到type =「cal」的主題。 whereContainedIn方法將幫助你,數組的字符串是否在列中可用。 使用「雙字符串」