Hello, I am new to sails and I'm trying to create a model API that will produce the following output:
[
{
"icon" : [
{"name":"ico1", "ico_typ":"fb", "ico_content_URL":"someLocation"},
{"name":"ico2", "ico_typ":"tw", "ico_content_URL":"someLocation"},
{...}
]
"createdAt":
"updatedAt":
}
]
I initially thought I could achieve this by passing the icon attribute as an Array, but the issue is that it passes the entire array as a string when I load it in REST CLIENT. Additionally, I am unable to validate the values inside the array, such as ensuring each object has ico_type and URL before loading into the database. Any suggestions on how to properly use arrays in this context would be greatly appreciated! Thank you so much! Sails_v0.11.0 MongoDB_3.0.1