Open coco-super opened 2 years ago
I try to find answers in other issues. Find similar problems, but this is not what I want. #114
https://github.com/silentmatt/expr-eval/blob/6e889e0e75c50ac37d70c35388602025650e0c50/src/functions.js#L253 The above code is modified as:
export function arrayIndex(array, index) {
if (Array.isArray(array)) {
return array[index | 0];
}
return array[index];
}
Then the world will be peaceful.
Use the latest version and write the following code:
Parser.evaluate('in1["key"]', { in1: { key: 'value' } });
I expect the above code to output "value", but got
undefined
Can you spare some time to have a look? Thank you. @silentmatt