What is the best way to translate that : ``` user....
# getting-started
f
What is the best way to translate that :
Copy code
user.firstName=="firstName" && user.lastName=="lastName"
into that
Copy code
context.getJsonObject("user").getValue("firstName") == "firtName" && context.getJsonObject("user").getValue("lastName") == "lastName"
I started with that:
Copy code
var result = "context."
            val conditionAsList = condition.condition.split(".")
            val middleCondition = conditionAsList.minus(conditionAsList.last())
            result += middleCondition.map {"getJsonObject('$it')" }.joinToString(".")
            result += ".getValue('${conditionAsList.last()})"
            return result
The final goal is to check vlaue inside a Json Object