workmaze / just.net Goto Github PK
View Code? Open in Web Editor NEWJUST - JSON Under Simple Transformation (XSLT equivalent for JSON).
License: MIT License
JUST - JSON Under Simple Transformation (XSLT equivalent for JSON).
License: MIT License
To whom it may concern,
given the following JSON:
{ "total": 3, "data": [ { "PlacementId": 1, "candidate": { "CandidateId": 2311, "secondaryOwners": null, "owner": null, "id": 2311, "CustomUserId": 0 }, "approvingClientContact": null, "owner": { "id": 1949, "OwnerId": 1949 }, "CustomUserId": 42 }, { "PlacementId": 1, "candidate": { "CandidateId": 2311, "secondaryOwners": null, "owner": null, "id": 2311, "CustomUserId": 0 }, "approvingClientContact": null, "owner": { "id": null, "OwnerId": null }, "CustomUserId": 42 }, { "PlacementId": 1, "candidate": { "CandidateId": 2311, "secondaryOwners": null, "owner": null, "id": 2311, "CustomUserId": 0 }, "approvingClientContact": null, "owner": null, "CustomUserId": 42 } ] }
and the following transformation:
"Placement": { "data": { "#loop($.data)": { "CustomUserId": "#valueof($.CustomUserId)", "candidate": { "CandidateId": "#valueof($.candidate.CandidateId)" }, "clientCorporation": { "ClientCorporationId": "#valueof($.clientCorporation.ClientCorporationId)" }, "owner": { "OwnerId": "#ifcondition(#valueof($.owner),null,#valueof($.CustomUserId),#ifcondition(#valueof($.owner.OwnerId),null,#valueof($.CustomUserId),#valueof($.owner.OwnerId)))" } } } }
I get a null reference exception in the transformer. I cannot figure out the possible cause as the #ifcondition nesting seems to be fine. I have tried using #valueof(null) as the evaluation expression instead of just null but that did not seem to help. It generally evaluates to false of the owner is null.
If I use null the #ifcondition evaluates to false, but if I use #valueof(null) - I get an error, with the following transfomer:
#valueof($.owner),null,#valueof($.CustomUserId),#valueof($.owner.OwnerId)
Additional question - is there a way of accessing a variable from a "higher level" in the loop section? e.g. if "CustomUserId" was at the same level as "data".
The project seems to be extremely promising. I'd definitely contribute to it. Is there any plans of releasing the source code?
Hi!
And this again I)
Is it possible to implement a concat method as #concat(#valueof(...),#const(...)) or #concat(#const(...),#valueof(...))?
In the current version impossible to make a concatenation with ','.
And would like to have a method #concat(#const([separator]),#valueof(...),#valueof(...),...), because join several fields looks as
"Document": "#concat(#concat(#concat(#concat(#concat(#concat(#valueof(
And it is not the biggest line)
Since version 4.02 the xconcat method does not work
System.Exception: Error while calling function : #xconcat(#valueof($.Model))
Currentvalueatpath evaluates the expression in the context of the current loop. Valueat evaluates expression in the global context.
Can we try to make a function that allows to get the value of the another context?
For example like this:
#currentvalueatpath(path is here, -1) would run in the parent loop.
Or some way of defining a scope by name, e.g.:
#loop(path, "parentScope")
...and then inner loop #loopwithincontext(path somewhere inside)
...and then getting the value #currentvalueatpath(path, "parentScope") //that would evaluate the path in the scope of "parentScope" named context
Where is the source code for this component? Extremely interested in seeing this. Where can you get it?
I have this:
{
"Array": [
{
"Dog": "Fido",
"Treat": "Chewbone"
}
]
}
And this fails:
{ "Dog Pound": { "#loop(
I want this:
{ "Dog Pound": [ "Fido" ] }
Is there something wrong with my JsonPath? When I test it against a JsonPath tool, the path
Thank you for solving the problem of the installation of the package.
But now another problem - it is control characters.
the input:
{
"ArrivePlace": "Bryansk, \"Parkovaya\""
}
the exception:
Newtonsoft.Json.JsonReaderException: Additional text encountered after finished reading JSON content: ,. Path '', line 1, position 0.
в Newtonsoft.Json.JsonTextReader.Read()
в Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
в Newtonsoft.Json.Linq.JToken.Parse(String json)
в JUST.JsonTransformer.RecursiveEvaluate(JToken parentToken, String inputJson, JArray parentArray, JToken currentArrayToken)
в JUST.JsonTransformer.Transform(String transformerJson, String inputJson)
Hi,
how can I retain a value type during a transformation?
the input:
{
"id": 20,
"active": true,
}
the transform:
{
"typeId": "#valueof($.id)",
"active": "#valueof($.active)"
}
the output:
{
"id": "20",
"active": "True"
}
Is there a way to create a nested loop?
#loop(#currentvalueofpath(...)) ends with "Unexpected character while parsing path indexer: $”" error.
the input
{
"Route": [
{
"index": 1,
"arriveTime": "1970-01-01T19:29:00+03:00",
"departTime": "1970-01-01T19:32:00+03:00",
"name": "abc"
},
{
"index": 2,
"arriveTime": "1970-01-01T22:05:00+03:00",
"departTime": "1970-01-01T22:15:00+03:00",
"name": "def",
"info": "info"
}
]
}
the transform
{
"Route": {
"#loop($.Route)": {
"Info": "#ifcondition(#exists(#currentvalueatpath($.info)),true,#currentvalueatpath($.info), )"
}
}
}
the output
System.Exception: Error while calling function : #ifcondition(#exists(#currentvalueatpath($.info)),true,#currentvalueatpath($.info), ) - Error while calling function : #exists(#currentvalueatpath($.info)) - Error while calling function : #currentvalueatpath($.info)
Given the following input:
{
"theAnswer": 42,
"bool": true,
"pi": 3.141592653,
"secret": "xyzzy",
"complex": {
"name1": {
"first": "Mickey",
"last": "Mouse"
},
"name2": {
"first": "Donald",
"last": "Duck"
}
}
}
The following transformation works as expected:
{ "#": [ "#copy($)", "#replace($.complex.name1,#valueof($.complex.name2))" ] }
Holwever, the following transforms do not work as expected (in the first 7 examples, no replacement is performed; in the last example the value of "name1" is replaced with {}):
{ "#": [ "#copy($)", "#replace($.theAnswer,#valueof($.complex.name1.first))" ] }
{ "#": [ "#copy($)", "#replace($.theAnswer,#valueof($.complex.name1))" ] }
{ "#": [ "#copy($)", "#replace($.theAnswer,#valueof($.complex))" ] }
{ "#": [ "#copy($)", "#replace($.theAnswer,#valueof($.secret))" ] }
{ "#": [ "#copy($)", "#replace($.theAnswer,#valueof($.pi))" ] }
{ "#": [ "#copy($)", "#replace($.complex.name1.first,#valueof($.complex.name2.first))" ] }
{ "#": [ "#copy($)", "#replace($.complex.name1.first,#valueof($.complex.name2))" ] }
{ "#": [ "#copy($)", "#replace($.complex.name1,#valueof($.complex.name2.first))" ] }
Hi,
It would be very nice if it was possible to somehow "register" a dll with custom functions so they could be used like any built in function .. preferably like #myns::myfunc() syntax where myns is a custom namespace specified when registering dll/class.
I hope this makes sense ?
Nicolai
Hi,
there is a problem with large numbers.
the input:
{
"LogId":5000510625
}
the transform:
{
"LogId": "#valueof($.LogId)"
}
and exception:
System.Exception: Error while calling function : #valueof($.LogId)
в JUST.JsonTransformer.parseFunction(String functionString, String inputJson, JArray array, JToken currentArrayElement)
в JUST.JsonTransformer.RecursiveEvaluate(JToken parentToken, String inputJson, JArray parentArray, JToken currentArrayToken)
в JUST.JsonTransformer.Transform(String transformerJson, String inputJson)
custom function syntax is really ugly. I am building an editor kinda thing and have a couple of custom functions.
instead of this long syntax
#customfunction(JUST.NET.Test,JUST.NET.Test.Season.findseason,#valueof($.tree.branch.leaf),#valueof($.tree.branch.flower))
i would like to have something like
$findseason(...)
in order for JUST to find my custom function, there could be a container and we could register our custom functions as such:
JUST.NET.CustomFunctions.Add(myCustomFunctionDll, methodName)
Hi,
Since you're including Newtonsoft Json.Schema library, that's only available under GPL or commercial license, I don't think that you can use the MIT license. Or do I miss something here?
Juergen
I have a simple JUST map:
{
"work_notes": "#valueof($.work_notes)"
}
Works most of the time but when it is applied to the attached payload it throws "Object reference not set to an instance of an object." The property value is escaped JSON that I'm able to unescape.
test3.zip
What is causing the error? Is there something wrong with my data?
Hi,
I was try to use if-condition
method with some operators like (<,>,>=,<=).
Is it possible to use with if-condition
?
"{ 'has_items' : '#ifcondition(#valueof($.items[0].answers[?(@.number == 3 && @.type == 'number')].number),3,yes,no)' }"
Above, what I have tried. Thanks!
Hi,
I am trying to filter the array using jsonpath with #currentvalueatpath as below but not working..
Source Data : {
"PhoneTypeToSearch": "iPhone",
"Address": [
{
"City": "NewYork",
"name": "Jim"
},
{
"City": "NewYork",
"name": "John"
}
],
"people": [
{
"name": "Jim",
"phoneNumbers": [
{
"type": "iPhone",
"number": "0123-4567-8888",
"countryPrefix": "34"
},
{
"type": "work",
"number": "012567-8910"
}
]
},
{
"name": "John",
"phoneNumbers": [
{
"type": "iPhone",
"number": "0123-4562347-8888",
"countryPrefix": "43"
},
{
"type": "home",
"number": "0134523-4567-8910"
}
]
},
{
"name": "John"
}
]
}
Transformer -
{
"Persons": {
"#loop($.people)": {
"Address": "#valueof(
}
}
}
however if I hardcode the filter value like "Address": "#valueof($.Address[?(@.name== 'Jim')])" then its working. but in my case I need pass the name under loop. any idea ?.
Hi, it seems that the'sumathpath' function only operates on numbers and not on fractions. Are there any plans to support fractions in the future?
For a given JSON:
{
"SomeObject": [
{
"State": "A"
},
{
"State": "B"
}
]
}
the JSONPath $.SomeObject[*] returns:
[
{
"State": "A"
},
{
"State": "B"
}
]
which is an array.
The transformer yields an error „Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Newtonsoft.Json.Linq.JArray'.”
Any idea why it happens? I have double checked the path in the evaluator, and it seems to work fine.
When I removed the [*] it seems to work fine. Also, when the value is not found, the NullPointerException occurs. What to do when the field on which I am looping is not mandatory?
Hello.
I've been trying to use #valueof inside double quotes within an xml attribute. However the DataTransformer.Transform doesn't transform this object. It just returns it as it is.
example :
Can you please let me know how can I transform attribute values?
The assembly company and assembly copyright shows HP.
I want to transform Json that contains array. In one scenario, i want to skip iteration in loop. Is it possible to skip iteration on condition. As of now i want to skip first and last iteration
transform
{
"array": "#valueof($.paths)"
}
source
{
"paths": [
{
"test": []
}
]
}
Exception with "[]"
System.NullReferenceException: 'Object reference not set to an instance of an object.'
Hi,
Actually I have two issues.
In every day work I have to convert XML to JSON and vice versa. Data types are loosed while converting from XML to JSON. For example:
15 is converted to { "age": "15" }, but should be { "age": 15 }.
So, I am wondering is it possible to add type conversion functions like #tolong(#valueof()), #todouble() and to #toboolean()?
Another issue relates to previous one. If I have large JSON structure, and I want to convert types only for few elements. What JSON template should I use? I don't want to write each field into template, but to do same way as in XSLT with template match; copy everything as is, but catch only some element and make operations on them.
Thank you in advance,
Lev
Good afternoon,
When using the method #currentvalueatpath , I noticed an incorrect transformation when the parameter is the datetimeoffset.
the input
{
"Route": [
{
"index": 1,
"arriveTime": "1970-01-01T19:29:00+03:00",
"departTime": "1970-01-01T19:32:00+03:00",
"name": "abc"
},
{
"index": 2,
"arriveTime": "1970-01-01T22:05:00+03:00",
"departTime": "1970-01-01T22:15:00+03:00",
"name": "abc"
}
]
}
the transform
{
"Route": {
"#loop($.Route)": {
"Index": "#currentvalueatpath($.index)",
"ArriveTime": "#currentvalueatpath($.arriveTime)",
"DepartTime": "#currentvalueatpath($.departTime)",
"Point": "#currentvalueatpath($.name)"
}
}
}
the output
{
"Route": [
{
"Index": "1",
"ArriveTime": "01/01/1970 19:29:00",
"DepartTime": "01/01/1970 19:32:00",
"Point": "abc"
},
{
"Index": "2",
"ArriveTime": "01/01/1970 22:05:00",
"DepartTime": "01/01/1970 22:15:00",
"Point": "abc"
}
]
}
Hello, everyone. I'm writing this to ask if there's a way to pass, as a Transformer, an Array as JSON.
As example, this is what I have:
{
"first": [
{
"sign-name": "Heart rate",
"date": "2018-12-01",
"value": 72
},
{
"sign-name": "Heart rate",
"date": "2018-12-03",
"value": 65
},
{
"sign-name": "Heart rate",
"date": "2018-12-04",
"value": 75
},
],
"second": [
{
"sign-name": "Heart rate",
"date": "2018-12-01",
"value": 70
},
{
"sign-name": "Heart rate",
"date": "2018-12-03",
"value": 55
},
{
"sign-name": "Heart rate",
"date": "2018-12-04",
"value": 68
},
]
}
And my transformer would be something like this:
[{
"title": "#valueof($.first[0].sign-name)",
"uom": "bpm/min",
"xLabel": "#valueof($.first[0].sign-name)",
"yLabel": "bpm/min",
"data": {
"#loop($.first)": {
"x": "#currentvalueatpath($.date)",
"y": "#currentvalueatpath($.value)"
}
}
}, {
"title": "#valueof($.second[0].sign-name)",
"uom": "bpm/min",
"xLabel": "#valueof($.second[0].sign-name)",
"yLabel": "bpm/min",
"data": {
"#loop($.second)": {
"x": "#currentvalueatpath($.date)",
"y": "#currentvalueatpath($.value)"
}
}
}]
Unfortunately, this won't work because of an error:
Error during JUST transformation
Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1.
Am I doing something wrong? Or is it simply something I can't do? I thank you all in advance for any help you can give me.
Provide function to measure size of arrays or length of strings.
I am using a custom function to map a json property value from name to internal Id.
When the value is null JUST.net doesn't seem to pass the null value to the custom function (which is what I was expecting, but throws an exception.
From my analysis, this function is what is causing the problem.
private static object GetTypedValue(Type pType, object val)
{
object typedValue = val;
var converter = TypeDescriptor.GetConverter(pType);
if (converter.CanConvertFrom(>>>>**val.GetType()**<<<<))
{
typedValue = converter.ConvertFrom(val);
}
.....
As the val in above statement is null and causing Object reference not set.
Characters like sharp, comma and round brackets are considered special characters, provide a way to escape them so they can be treated as plain text.
Relates to #59
Hellow!
How can I concatenate a parameter with a constant value?
And how can I concatenate several parameters, more than two and with a separator?
{
"Name": "Ivan",
"Surname": "Ivanov",
"Patronymic": "Ivanovich"
}
=>
{
"FullName": "Ivanov Ivan Ivanovich"
}
Noticed strange behavior:
input
{
"Name": "Ivan",
"Surname": "Ivanov"
}
transform
{
"FullName": "#concat(#valueof($.Name),#valueof($.Surname))"
}
output
{
"FullName": "IvanIvanov"
}
but if transform
{
"FullName": "#concat(#valueof($.Name), #valueof($.Surname))"
}
then output
{
"FullName": "Ivan, #valueof($.Surname))"
}
Is it an error or should it be?
When using #ifcondition, both true and false expressions are evaluated prior to knowing the result of the test condition. This can lead to errors when values used on these expressions are only available on one of the expressions.
Programming languages only evaluate one of the expressions according to the result of the test condition, apply the same logic here.
Is it going to be supported in .NET Standard?, Also will it be possible to expose Stream APIs, since if we have large data which required transformation, what will be memory footprint. In our case data might be large as 4 MB.
How in the transformation does not lose the time zone?
{ "SendDate": "2017-04-26T19:27:00+03:00" }
After the transformation
{ "SendDate": "26.04.2017 19:27:00 }
I wanted to use JUST.net to transform an API response, which is an array of elements into another array. JUST.net seems to treat the root element as a JObject instead of JToken and hence the root of the JSON ($) should always be an object and not an array.
I am currently working around by wrapping my API response inside an object and using a property accessor. Not having to deal with this unwanted wrapping would be great.
Hello and thank you for your awesome work!
I have JSON like this:
{ "prop": "hello", "arr": [ { "title": "item1" }, { "title": "item2" } ] }
and would like to get this:
{ "list": [ { "title": "item1", "prop": "hello" }, { "title": "item2", "prop": "hello" } ] }
I was hoping to use a transformer like this:
{ 'list': { '#loop($.arr)': { 'title': '#currentvalueatpath($.title)', 'prop': '#valueof($.prop)' } } }
But it seems "$" already refers to the root of the current iteration, and not the actual root of the document. So #valueof(
Is this intended? If so, any clues on how to achieve what I'm trying to do?
Thanks again!
Considering transforming this JSON
{
"answers":[{"value": [{"id":1}]}]
}
to
{
"results":[{"spec-Id":1}]
}
I can write some transformation file like
{
"results": "#valueof($.answers[0].value)"
}
But how can I rename "Id" to "spec-Id"? Probably I can have a custom function to do the conversion. But I will lose the capability to reuse existing function that has been defined in the custom function, and if the $.answers[0].value becomes complex, the custom function will become big and it's meaningless to use the transform template.
#ifcondition(#stringcontains(#valueof($.d[0]),n),true,yes,no): Example from Just.Net git
In this example, we are trying to hard code n, instead can we check value of $.d[0] contains in an array of string [a,b,c,n].
do we have a way where we can do something like this?
#ifcondition(#stringcontains(#valueof($.d[0]),[a,b,c,n]),true,yes,no)
It looks like the input json is passed around inside the transformer as a string and is parsed in each function that needs a JObject. Is there a reason for this? It looks like you could just pass the parsed JObject to each function saving the memory and time to parse. The only place I see that could cause issues is when you loopwithincontext where you reset the root json object, but I would think you could just parse the fragment in that scenario.
Our JSON input can be quite large and I'm worried about memory/time implications of parsing it multiple times.
Hi, first thank for great library.
Second, i find one issue when transforms float/doubles.
Actually function GetValue transform json to object float and sometimes has wrong.
How reproduce:
Example
{
"records":[
{
"id":"a83D000sdfhIAA",
"name":"700024",
"value_1":416889.0,
"value_2":1557597.06,
"value_3":1557597.06,
"value_4":1557597.06,
"value_5":17250.11,
"value_6":30.0
}
]
}
Transformer
{
"result":{
"#loop($.records)":{
"trans_id":"#currentvalueatpath($.id)",
"trans_name":"#currentvalueatpath($.name)",
"trans_value_1":"#currentvalueatpath($.value_1)",
"trans_value_2":"#currentvalueatpath($.value_2)",
"trans_value_3":"#currentvalueatpath($.value_3)",
"trans_value_4":"#currentvalueatpath($.value_4)",
"trans_value_5":"#currentvalueatpath($.value_5)",
"trans_value_6":"#currentvalueatpath($.value_6)"
}
}
}
Result
{
"result":[
{
"trans_id":"a83D000sdfhIAA",
"trans_name":"700024",
"trans_value_1":416889.0,
"trans_value_2":1557597.0,
"trans_value_3":1557597.0,
"trans_value_4":1557597.0,
"trans_value_5":17250.11,
"trans_value_6":30.0
}
]
}
I test change de returned value to double when the type is JTokenType.Float and work.
Captures:
Other persons comment the same issue in the page
https://www.codeproject.com/Articles/1187172/JUST-JSON-Under-Simple-Transformation?fid=1921479&df=90&mpp=25&prof=True&sort=Position&view=Normal&spc=Relaxed&fr=1#_comments.
.
With this change work too.
Thanks.
JUSTContext
constructor should be able to define the custom functions.
It shouldn't be required to instantiate a JUSTContext
, and then execute the function RegisterCustomFunction
.
Example:
var justContext = new JUSTContext
{
EvaluationMode = EvaluationMode.Strict
// a property to set the custom functions should be added here
};
// the line below should be unnecessary
justContext.RegisterCustomFunction("assemblyName", "fullname", "methodName", "methodAlias");
Hi,
as per our scenario am looking for if-condition with multiple conditions like if (country == 'US' and (State ='TX' || State = 'AR') then return country else return 'US', is there any possibility I can achive on this , even I tried with jsonPath as below, but no luck.
"{ 'has_items' : '#ifcondition(#valueof($.items[0].answers[?(@.number == 3 && @.type == 'number')].number),3,yes,no)' }
can you help on this ?.
Json input:
[
{
"target": "target1",
"datapoints": [
[
"datapoint1_target1_x",
"datapoint1_target1_y",
],
[
"datapoint2_target1_x",
"datapoint2_target1_y",
],
]
},
{
"target": "target2",
"datapoints": [
[
"datapoint1_target2_x",
"datapoint1_target2_y",
],
[
"datapoint2_target2_x",
"datapoint2_target2_y",
],
]
}
]
And want to flatten/transform this to following structure:
[
{
"target": "target1",
"x": "datapoint1_target1_x",
"y": "datapoint1_target1_y",
},
{
"target": "target1",
"x": "datapoint2_target1_x",
"y": "datapoint2_target1_y",
},
{
"target": "target2",
"x": "datapoint1_target2_x",
"y": "datapoint1_target2_y",
},
{
"target": "target2",
"x": "datapoint2_target2_x",
"y": "datapoint2_target2_y",
},
]
Thanks a lot
Hi!
How can I verify a property exist or not empty?
I tried
but it doesnt work
#ifcondition(#valueof(
Thanks in advance.
Thanks for the beautiful tool for JSON transformation.
Quick question: I tried the examples that you have provided in GitHub using Visual Studio 2017 - Console application. Really works well.
When I tried to use the same piece of code and same example in Azure function, it fails and I get the below error. I have used JUST.NETCore in azure function
It happens for all add, subtract, multiply and divide also.
Simple example I have used
Input.json
{
"d": [ "one", "two", "three" ],
"numbers": [ 1, 2, 3, 4, 5 ]
}
Tranformer:
{
"mathresult": {
"add": "#add(#valueof($.numbers[0]),3)",
"subtract": "#subtract(#valueof(
"multiply": "#multiply(2,#valueof($.numbers[2]))",
"divide": "#divide(9,3)",
"round": "#round(10.005,2)"
}
}
Error:
Executed 'TranformData' (Failed, Id=)
[6/5/2019 3:20:18 PM] System.Private.CoreLib: Exception while executing function: TranformData. JUST.NETCore: Error while calling function : #add(#valueof(
All I need is
Input : a=10, b=20
transformer:
"add": "#add(#valueof(
Even this is also failing in Azure function using JUST.NETCore
Please do the needful
Hi,
how can I convert int to string?
the input:
{
"Id": 123
}
I would like to get out
{
"Id": "123"
}
It doesnt work
{
"Id": "\"#valueof($.Id)\""
}
I'm trying to create a transform that just filters objects from an array, and it works, except the value is a string containing json objects instead of json objects.
A simple example:
I have JSON that looks like this:
{
"products": [
{
"name": "p1",
"type": "t1"
},
{
"name": "p2",
"type": "t2"
},
{
"name": "p3",
"type": "t1"
}
]
}
Applying a transform that selects only those objects from the array with type t1:
{
"t1_products": {
"#loop($.products[?(@type=='t1')])": "#currentvalue()"
}
}
I get this result:
{"t1_products":["{\"name\":\"p1\",\"type\":\"t1\"}","{\"name\":\"p3\",\"type\":\"t1\"}"]}
I was expecting:
{"t1_products":[{"name":"p1","type":"t1"},{"name":"p3","type":"t1"}]}
I have found if I create a new object in the loop like:
{
"t1_products": {
"#loop($.products[?(@type=='t1')])": {
"product": "#currentvalue()"
}
}
}
Then I get json objects as the value of each product, but I'd rather not add an unnecessary object to the output.
Thanks for the great package.
For my special purpose, here is my expectation. Can I do that?
Then,
the "xxxx" can be anything from the input, for example. it could be "phone" or "laptop" or etc.
Or,
Thanks for any suggestion.
Consider such a construction somewhere inside a loop:
someProp: #valueat($.someGlobalData[?(@.id==#currentvalueatpath($.id))])
That would allow me to achieve relational-like mapping!
From what I see it doesn't have to be very hard.
You can count the '[' and '(' and start evaluation of the # functions from the "deepest" place.
We can assume that those functions returns a simple value here...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.