0
我需要從以下JSON的flowVars在騾子ESB 3.8.3比較flowVars值JSONPath值在騾子ESB
{"id":"users_0001","username":"0001","firstName":"AB","lastName":"C","email":"[email protected]","enabled":true}
在選擇運營商
<choice doc:name="Choice">
<when expression="#[json:[0]/username != flowVars.username]">
<flow-ref name="put account" doc:name="put account"/>
</when>
<otherwise>
<flow-ref name="do nothing" doc:name="do nothing"/>
</otherwise>
</choice>
使用這種表達比較用戶名在調試過程中,我可以看到兩個json:[0] /用戶名& flowVars.username返回相同的值,但爲什麼當比較它們時總是返回false?
這裏的結果,當我評價他們
flowVars.username == "0001", returns true
flowVars.username == '0001', returns true
flowVars.username == 0001, returns true
json:[0]/username = 0001, returns true
json:[0]/username = "0001", returns false
json:[0]/username = '0001', returns false
json:[0]/username != flowVars.username, returns true
json:[0]/username = flowVars.username, returns false