Closed john-evan08 closed 2 years ago
Hello @john-evan08 :wave:
You should be able to use our asModel
option to flatten nested fields within a mongoose model (See this documentation)
Let me know if that helps
Hello @jeffladiray ,
Thanks for your quick answer. It works !
Good to know :)
I'm closing the issue then.
In the future, don't hesitate to go to our community if you encounter any issues or if you have any questions. We tend to answer a bit faster there 👍
Expected behavior
I have a mongoose schema with subdocuments containing subdocuments. (level = 3) When there is just one level of subdocuments, the first level estimate sub field type and put default widget on it. ✅
Actual behavior
But in my case (3 levels), forest admin just set a json editor widget to edit it. How to flatten the nested subdocuments so I can see them in related data with the suitable widgets ?
Failure Logs
Here is my JSON view in forest admin whereas I want the "blocks" to be in related data.
Context