angucomplete
angucomplete copied to clipboard
Allow nested JSON property access
Hi, first of all kudos for such directive, it's been useful :) Keep up the good work.
I have noticed it's not possible to access JSON nested properties from the response, which I would find really useful. For instance:
<angucomplete id="some-search" placeholder="Search" pause="400" selectedObject="selectedService" localdata="data" minlength="1" searchfields="service.name" titlefield="service.name" inputclass="form-control col-lg-4"/>
where data looks like:
[
{
"service": {
"name": "A"
},
"otherStuff": {}
},
{
"service": {
"name": "B"
},
"otherStuff": {}
}
]
Does it seem reasonable?
yes i have the same issue as i want to access picture url from picture Object
picture: { data: { is_silhouette: false url: "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xfa1/v/t1.0-1/p50x50/10014998_6 } } so is there any way to do that. Regards
Same here, I have a schema where Category>Products so I need Products.name, i can successfully do that with selectObject and ng-repeat but on printing not on the drop down. Thank You
Any update on this? I am trying to bind the search-fields
to location.address
and does not seem to work.
please post some code
+1
This would be very useful, especially when you're dealing with public APIs. A quick fix would be implementing a Angular Interceptor to adapt the response structure to your needs.