We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
arr1 = [{ "phone": "123", "status": "ON", "id": "id1" }, { "phone": "1234", "status": "ON", "id": "id1" }, { "phone": "1235", "status": "ON", "id": "id1" }]
arr2 = [{ "phone": 123, "status": "ON", "id": "id1" }, { "phone": "1234", "status": "ON", "id": "id1" }, { "phone": "1235", "status": "ON", "id": "id1" }]
expression = "$arr1_phone == $arr2_phone";
dic = { "arr1_phone": "123", "arr1_stratus": "ON", "arr1_id": "id1", "arr2_phone": "123", "arr2_stratus": "ON", "arr2_id": "id1", }
finalArray = []; for (int i=0; i<arr1.length; i++){ for (int j=0; j< arr2.length; j++){ keys = arr1.keys(); dictionary; for (k=0;k< keys.length;k++){ dictionary["arr1_"+keys[k]] = arr1[i][keys[k]] }
var keys2 = arr2.keys(); for (k=0;k< keys.length;k++){ dictionary["arr2_"+keys2[k]] = arr1[i][keys2[k]] }
var result = parser.parse(expression).evaluate(dictionary)
if (result) { finalArray.push(arr1); } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
arr1 = [{
"phone": "123",
"status": "ON",
"id": "id1"
}, {
"phone": "1234",
"status": "ON",
"id": "id1"
}, {
"phone": "1235",
"status": "ON",
"id": "id1"
}]
arr2 = [{
"phone": 123,
"status": "ON",
"id": "id1"
}, {
"phone": "1234",
"status": "ON",
"id": "id1"
}, {
"phone": "1235",
"status": "ON",
"id": "id1"
}]
expression = "$arr1_phone == $arr2_phone";
example
dic = {
"arr1_phone": "123",
"arr1_stratus": "ON",
"arr1_id": "id1",
"arr2_phone": "123",
"arr2_stratus": "ON",
"arr2_id": "id1",
}
finalArray = [];
for (int i=0; i<arr1.length; i++){
for (int j=0; j< arr2.length; j++){
keys = arr1.keys();
dictionary;
for (k=0;k< keys.length;k++){
dictionary["arr1_"+keys[k]] = arr1[i][keys[k]]
}
var keys2 = arr2.keys();
for (k=0;k< keys.length;k++){
dictionary["arr2_"+keys2[k]] = arr1[i][keys2[k]]
}
var result = parser.parse(expression).evaluate(dictionary)
if (result) {
finalArray.push(arr1);
}
}
}
The text was updated successfully, but these errors were encountered: