How can I store nested Data?
Hrishi25 opened this issue · 1 comments
Hrishi25 commented
id: 1
company: xyz
employes:
- name: Firstname Lastname
- email xyz@abc.com
- name: xyz xyz
email: xyzz@abc.com
I have above structure of incoming data. I have 2 struts to store company info and employee info. So basically I have belo field in strut company
type Company strut {
Id string
Employees []Employee
}
For above structure I wonder how do I insert employee information
yinonavraham commented
Inserting objects with nested data is exactly the same as any other objects.
The main question should probably be - how to create indexes for such structs, right?
If so, you can refer to issue #97 (on using nested fields for indexes) which answers this question, including a very good example.