Hi,
Is there a way to check if two expressions are equal? The below expressions are equal but they give the following output which makes a.equals(b) comparison falls (i think the id thing?)
Expression a = Expression.property("type").equalTo(Expression.string("type"));
Expression b = Expression.property("type").equalTo(Expression.string("type"));
log(a)
//BinaryExpression{@0x4ba3357,json=[=, [.type], type]}
log(b)
//BinaryExpression{@0xb368e44,json=[=, [.type], type]}
a.equals(b); // returns false but they are equal content wise.
Currently, I am thinking of:
convert expresions to string
split the on the word "json"
compare the second element of the array aArray[1].equals(bArray[1])
but is there a simple way?
For those who are curious, I do need it.