i got a json that looks like this
[{"partner_id":"8","partner_name":"Company1","partner_location":["Place1","Place2","Place3"],"partner_user":["User1","User2","User3"]},{"partner_id":"9","partner_name":"Company2","partner_location":["Place4","Place5"],"partner_user":["User4","User5"]}]
Now i want to do something like this. I have 2 dropdowns and i want the first one to be filled with the partner_name from my 2 lists so it has to look like this
<select>
<option value="8">Company1</option>
<option value="9">Company2</option>
</select>
but i want it to be selected already with a value that i set inside service_id.
I understand you can do this somehow like this
<select ng-options="partner for partner in jsonPartners" ng-model="service_id"></select>
but when i do this, i have inside my select 2 options called [object Object]
And the 2nd select is more tricky, i want it to have the locations of what the id was selected in my 1st select. So if i selected Company1, than it should be filled with Place1, Place2, Place3 and if i selected Company2, it should be filled with Place4, Place5.
Thank you in advance, Daniel!