You are not logged in.
Pages: 1
Hello!
I got some document from MongoDB to TDocVariant like below:
[{"_id":{"$oid":"53D75BD3ACD063FD19EA3250"}, "STime":{"$date":"2014-08-18T08:30:30"}, "V1":"1", "V2":"2"}]
I could get the data "1" at TDocvariant variable Doc.V1 and i want to direct access the value as Doc.Value[x] for "V1".
but i have got error message:
"Variant method calls not supported"
What could i do access the value using index?
Offline
I'm so messy!.
Lutf8: RawUtf8;
Doc2: variant;
...
LUtf8 := VariantSaveJSon(Doc);
Doc2 := _Json(Lutf8);
writeln(Doc2.Value(2)); //<--V1's value 1 is displayed
but,
i := 2;
writeln(Doc2.Value(i)); //<-- Variant method calls not supported
The result is different when constant 2 and variable i for Doc2.value(x).
Please give me some hint.
Last edited by bigheart (2014-08-19 04:33:57)
Offline
Pages: 1