Skip to content
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

FORMS Submit. #104

Open
sultanassi95 opened this issue Mar 18, 2018 · 0 comments
Open

FORMS Submit. #104

sultanassi95 opened this issue Mar 18, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@sultanassi95
Copy link
Member

So, these are your NODES 👍

8 : {
formname:"asd"
entryDate:"asd"
nodes:[ array of keys ],
mentorID: 1
}

what I want you to do, is loop throw the nodes array ..
and get each object from inside it:
let's say this is a node:

node = {
surname: 'something',
anotherthing: 'entirly different something'
}

all what I 'm lookin for is to get the surname: 'something' to be taken from that node
and inserted inside the mentor.info object..

HINT:

// this is the mentorObject : mentorObj
// this is the infoObject: mentorObj.info
const info = mentorObj.info
let newMentorInfo = {}

form.nodes.map((node) => {
newMentorInfo = {
...info,
[node.somekey]: node.somekeyVALUE
}
}

I this it should look something like that
good luck mate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants