AutoTools JSON Trouble

Discussion in 'AutoApps' started by libnaniam, Apr 29, 2018.

  1. libnaniam

    libnaniam New Member

    Apr 28, 2018
    Likes Received:
    Hello, I am having trouble dumping a root json object into the value of another json file. Essentially, I am trying to turn a .json that looks something like this {key1: {}} into this {key1: root2}

    I have attached json file that I read from file (renamed to .txt so that I could attach it to this post).

    This is my setup:

    1. JSON Read - Attached .json file (aka "root1")
    Input Format: Json
    Simple Mode: true
    Json: path to file
    Json Root Variable: testroot
    Separator: ,

    2. JSON Read - URL (aka "root2")
    Input Format: Json
    Simple Mode: true
    Json Root Variable: todayjson
    Separator: ,

    3. JSON Write
    Separator: ,
    Update Fields: today
    Update Values: %todayjson
    Arrays Separator: |

    I am getting an error that says "update paths and values must have the same number of values." I think the problem is that AutoTools treats root2 as multiple key/value pairs rather than one json object. Has anyone encountered this before or can think of a solution?

    Attached Files:

  2. joaomgcd

    joaomgcd Administrator Staff Member

    Feb 3, 2015
    Likes Received:
    If you want to use existing JSON use in the input field in the JSON Write action :) That should work!
    Jettavod likes this.
: autotools, json, root

Share This Page