How do I select the first element found by a lens? #205
-
Hi, given the following JSON and query {
"formulae": "..."
"casks": [
{
"...",
"artifacts": [
"...",
{
"binary": [
"/opt/homebrew/Caskroom/miniconda/base/condabin/conda"
]
}
]
}
]
} I get the following which is expected [
{
"binary": [
"/opt/homebrew/Caskroom/miniconda/base/condabin/conda"
]
}
] How do I extract the value |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @JackWolfard , What about using simple like |
Beta Was this translation helpful? Give feedback.
-
@JackWolfard I totally agree with you. I was playing with something similar to your solution and I faced some issues while mixing filters and lenses. This is actually a bug / limitation. I've started to work on a new big refactoring of the project since I think the code has grown in a too complicated way. |
Beta Was this translation helpful? Give feedback.
-
Incoming changes are on their way :) #206 |
Beta Was this translation helpful? Give feedback.
Hi @JackWolfard ,
What about using simple like
'"casks"[0]"artifacts"[1]"binary"[0]'
?