I am currently working with Boolean and logical operators using code like this:
Just so you know, I want to convert object values and logic into an array to perform logical operations. For example: object1.logic object.operators object2.logic as either true or false.
const input: Array<any> = [
{
type: "basic",
value: true,
logic: "or"
},
{
type: "basic",
value: false,
logic: "and"
},
{
type: "basic",
value: true,
logic: "and"
},
I expect the result to be equivalent to:
true || false && true
Does anyone have a solution for this particular issue?