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

Allow nested JSON property access #90

Open
jarandaf opened this issue Mar 20, 2015 · 6 comments
Open

Allow nested JSON property access #90

jarandaf opened this issue Mar 20, 2015 · 6 comments

Comments

@jarandaf
Copy link

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?

@MoatazAbdallh
Copy link

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

@iblong2iyush
Copy link

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

@jnystrom
Copy link

Any update on this? I am trying to bind the search-fields to location.address and does not seem to work.

@singhay
Copy link

singhay commented Oct 23, 2015

please post some code

@uneess
Copy link

uneess commented Jul 3, 2016

+1

@uneess
Copy link

uneess commented Jul 3, 2016

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.

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

6 participants