S7014877
Posts: 0
Joined: Wed Jul 30, 2014 4:52 pm

Embedded documents

Hello,

I am trying to create Embedded documents in the appery.io database
{
username: "123zyx",
contact: {
phone: 5555555555,
email: "a href="mailto:asde@sder.com" rel="nofollow"asde@sder.com/a"
},
access: {
level: 5
group: "dev"
}
}

Please help me on how to do it

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Embedded documents

Hello,

Could you please clarify your question in details, what exactly you can't do?

S7014877
Posts: 0
Joined: Wed Jul 30, 2014 4:52 pm

Embedded documents

Hi I am trying to create a document with Embedded values as below -

If I have a collection called c_log - I need to create a document as below -
{
username: "123zyx",
contact: {
phone: 5555555555,
email: "a href="mailto:asde@sder.com" rel="nofollow"asde@sder.com/a"
},
access: {
level: 5
group: "dev"
}
}

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Embedded documents

Hello,

Could you please post a screenshot of your collection 'c_log' so we could see all fields and their types?

S7014877
Posts: 0
Joined: Wed Jul 30, 2014 4:52 pm

Embedded documents

Sure, but I dont know how to display the types....please see attached

Many thanks Image

S7014877
Posts: 0
Joined: Wed Jul 30, 2014 4:52 pm

Embedded documents

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Embedded documents

Hello,

Please follow these steps:

1 Open DB.

2 Open collection which is you want to populate with these values.

3 Create column with type "Object" http://prntscr.com/499qij/direct

4 Add new row.

5 Populate this column in new row with json string:

pre

{
"username": "123zyx",
"contact": {
"phone": 5555555555,
"email": "asde@sder.com"
},
"access": {
"level": 5,
"group": "dev"
}
}

/pre

You can use any correct JSON object in this field.

Regards.

S7014877
Posts: 0
Joined: Wed Jul 30, 2014 4:52 pm

Embedded documents

Hello Yurii,

Got it, thanks very much!

Sam

Return to “Issues”