-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add object to array #42
Comments
I think you probably should look into the
|
Thank you, I`ll try. |
Having a look at this one again, it may be |
Did you solve this? Nothing of the options above work for me, I can't even read data out of an array. Help pls, do you have an example on how to read data from an array? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
Help, please, I can't to find the solution.
There is the object
{
"_id" : "id1",
"data" : [
{
"jobs" : [
{
"title" : "t1",
"type" : "tt1",
"category" : "c1"
},
{
"title" : "t2",
"type" : "tt2",
"category" : "c2"
}
]
}
]
}
I want to add the third job to the jobs array.
doc:=FMongoWire.Get(mwCollectionPersons,dSelector);
d0:= JSON(doc['data'][0]);
jobs_ru:= d0['jobs'];
n:= VarArrayHighBound(jobs_ru,1)+1;
VarArrayRedim(jobs_ru, n+1);
jobs_ru[n]:=JSON(['title','t3','type','tt3']);
fMongoWire.Update(mwCollectionPersons,dSelector,doc);
I have found that this code does not increase length of jobs array:
Could you posible to help me?
With best regards,
Dmitry.
The text was updated successfully, but these errors were encountered: