Field as integer ( Unity )

0 votes

Hello,

when I insert a row in the storage with this json :

int money = 12;
SimpleJSON.JSONClass json = new SimpleJSON.JSONClass();
json.Add("Money", new SimpleJSON.JSONData(money));

if  I try to query with orderby :

 NetworkServices.Instance.StorageService.FindDocsWithQueryPagingOrderBy(DbName, CollectionName,uselessQuery , 10, 0, "Money", OrderByType.ASCENDING,null);

I don't get an order by number, the result is like "money" is treated like a string.

How to get an order by number ?

Thank you !

 

asked Feb 26, 2014 in App42 Cloud API-BaaS by moddib (27 points)

1 Answer

+1 vote
 
Best answer

Currently it is an Issue in SimpleJSON and we are working to fix it. Alternatively, you can use InsertJsonDocUsingMap method to pass dictionary instead of JSON for saving the data or you can build JSON String from your code itself and pass it as string in InsertJSONDocument (String dbName, String collectionName, String json, callback) method.

 

answered Feb 27, 2014 by ajay123 (899 points)
selected Feb 27, 2014 by moddib
That's ok now, thank you it was fast !
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...