iantrich / list-card

📰 Display sensor list data in a table
Apache License 2.0
123 stars 34 forks source link

Subfield. multidimensional #37

Open joeydaal opened 3 years ago

joeydaal commented 3 years ago

Is there a way to select the value? I want the image value as showen below

entries:

rpitera commented 2 years ago

Looking for the exact same answer.

arthurgustin commented 2 years ago

It does not sound possible according to the code but I'm not a js developer. For this it would require the use of something similar to jsonpath, xpath but for objects (??), this way we could select any field inside a nested array of object with the following syntax (for @joeydaal use-case): $.links[type="image/jpeg"].url.

deam0n commented 2 years ago

I also would love this!

Dynamix72 commented 2 years ago

See #43 for an solution (made by deam0n)

Madelena commented 2 years ago

@Dynamix72 That solution seems to only work that very particular scenario, where the image link is under the href object instead of the hard-coded url object. It wouldn't work for any subfields.

I can see how the feature can be added, but it's significant work and I will look into that later.