0

Using CBLite Android, and storing docs (similar to Android Grocery Sync example) like this:

{
     "check" : true,
     "created_at" : "2014-02-25T10:16:46.026Z",
     "text" : "Soap",
     "prices":[  { "date" : "2014-02-25" , "value" : 12 }  ]
}

I get value in "text" field ​​as shown in the documentation:

...
Document document = row.getDocument();
String text = ((String)document.getCurrentRevision().getProperty("text"));
...

But, How should I do to get the value in, for example, "value" field?

Thanks.


Edit:
Getting documents
API reference

user3388293
  • 25
  • 1
  • 4
  • Can you link the library? Search in the doc to something which allow you to get an array, then read the array to get value – Marco Acierno Mar 07 '14 at 11:19
  • Thank you very much! Thanks to your comment I have done. I created an ArrayList variable, and I got the objects with .getProperty("prices") I'm a newbie in Stackoverflow. How I can rate your comment? – user3388293 Mar 07 '14 at 16:15
  • I posted an answer, accept it. You cannot rate comments (except upvotes).. – Marco Acierno Mar 07 '14 at 16:20

1 Answers1

0

Search in the doc to something which allow you to get an array, then read the array to get value.

Marco Acierno
  • 14,682
  • 8
  • 43
  • 53