0

I am working on Workfusion which is one of the automation tool and it consists of selenium, java and Web -harvest technology. Below is the snipped of my code.

  <while condition="${continue_flg}" maxloops="${full_data.size()-1}"
          index="ind">
          <script><![CDATA[
                 import com.google.gson.Gson;
                 Gson gson = new Gson();
                 LinkedHashMap recMapTemp1 = full_data[ind.toInt()];
                 println "*****"+recMapTemp1; // Contains key value map
                 jsonValueMap = gson.toJson(recMapTemp1);
                 println "*****"+jsonValueMap; // "data" is added before value
          ]]></script>

          <insert-datastore datastore-name="Fallout_type"
                 json-value-map="${jsonValueMap}" create="true" />
   </while>

In map Key is "ship to ctry cd" and Value is "AT" but after converting toJson String it gives as below. I dont need this data word i need normal Json Value.

"ship to ctry cd":{"data":"AT"},
Joop Eggen
  • 107,315
  • 7
  • 83
  • 138
Nitin Rathod
  • 159
  • 2
  • 15

1 Answers1

0

you can do :

println "*****"+jsonValueMap.data; 

to achieve that

Pramod S. Nikam
  • 4,271
  • 4
  • 38
  • 62