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

choose objects in array #842

Open
manuliner opened this issue Dec 3, 2020 · 1 comment
Open

choose objects in array #842

manuliner opened this issue Dec 3, 2020 · 1 comment

Comments

@manuliner
Copy link

Hello,

first at all thank you for this great way to generate jsons.

i was wondering if it is somehow possible to achieve the following:

i have an array of objects pets
each pet has it own values and therefore they are all different to each other.

cat:{ name: "", color:"", } dog:{ name:"", favorite toy:"" }

i would like to use your array function ( from the example page ) to add an object to the array but if i add an cat, the fields of the cat should appear. if i add an dog, the fields of the dog should appear.

thank you

manu

@robocoder
Copy link

Use patternProperties

btsimonh pushed a commit to btsimonh/json-editor that referenced this issue May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants