Open csaper opened 2 years ago
Hello @csaper, sorry for the late response.
Could try to execute the following test:
[
{
"id": 1,
"title": "Lorem ipsum 1"
},
{
"id": 2,
"title": "Lorem ipsum 2"
}
]
data.map(x => x.title)
As I'm unable to test this on macOS, so I'm trying to pinpoint if the issue is related to the Json not being able to be parsed or if it's related to the environment.
The part where the extension execute the eval if very simple so is highly possible that a unscaped character could led to this error https://github.com/psbds/vscode-jsonmap/blob/adf13bf4660b7684ba351059fc12b36c6915226f/src/ParserExtension.ts#L79-L84
Hi there @psbds --
I'm testing out the VSCode JsonMap extension. After opening a JSON file, running the
JsonMap: Open Command Parser
command and entering a parse command likedata.filter(x => x.id > 12)
,data.find(x => x.name == "Foo")
, ordata.map(x => x.title)
the extension host displays the errorsdata.filter is not a function
,data.find is not a function
anddata.map is not a function
, respectively.JsonMap
v0.1.1
Visual Studio Codev1.68.0
macOSv12.4
Let me know if I can provide any more information to aid in debugging.