I want to create an admin form for my meteor application; I was going to try Ogno Admin before starting to create one from scratch, but I'm not sure if it supports the data in the format I need. My current app data goes to mongo as follows:
Beaches.insert({
"name": "Entry name",
"location": {
"type": "Point",
"coordinates": [-5.0990296,50.110757]
},
"images": [
{
"url": "image1.jpg",
"caption": "Image caption"
}
],
"shortDesc": "A delightful description...",
"attributes": {
"attr 1": {
"score": 2,
"text": "attr1 text"
},
Can I write a simple diagram to support the various arrays / objects above (e.g. location coordinates)? Should they be square brackets in the format [lng, lat] - and will the ogno administrator work with this, or will I have to write custom materials? It might be easier for me to create an admin site elsewhere and get it to output JSON data for Meteor.
Update with possible schema code
Beaches = new SimpleSchema({
name: {
type: String,
},
location: {
type: [Object]
},
location.$.type: {
},
location.$.coordinates: {
},
images: {
type: [Object]
},
"images.$.url": {
type: String
},
"images.$.caption": {
type: String
},
attributes: {
type: [Object]
},
...
});