# Unable to access json field in script task when used rhino engine

**URL:** https://forum.flowable.org/t/unable-to-access-json-field-in-script-task-when-used-rhino-engine/10070
**Category:** Flowable Engine
**Created:** [January 4, 2023, 7:48am UTC](https://forum.flowable.org/t/unable-to-access-json-field-in-script-task-when-used-rhino-engine/10070 "2023-01-04T07:48:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![prasanta](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/prasanta/32/2864_2.png) [@prasanta](https://forum.flowable.org/u/prasanta)
#### Post date: [January 4, 2023, 7:48am UTC](https://forum.flowable.org/t/unable-to-access-json-field-in-script-task-when-used-rhino-engine/10070/1 "2023-01-04T07:48:06Z")

</div>

Hi,  
Currently I am using rhino script engine as I had to use SecureScriptExecutor for whitelisting java classes(to be used in script task).

So all javascripts written in script tasks are executed by rhino engine, rather than JDK default nashorn.

I am facing challenge when I try to access a field of a json type variable(variable was of type jackson JsonNode set in previous service task in deleteExecution) in a script task using dot operator it is not working.  
say jsonField = {“a”:10, “isTrue”:false};//Set in service task

Now below script in script task now working  
var a = execution.getVariable(jsonField);  
var b = a.b;//Not working

If I change the code below it is working  
var a = execution.getVariable(jsonField);  
a = JSON.parse(a.toString());  
var b = a.b;//working now.

Also I have extented org.flowable.variable.service.impl.types.JsonType to store it as custom type.

Any help will be greatly appreciated.
