Joining 2 JSON output into 1 String

edited May 2016 in Arduino

Hi all!

I have Processing read from a PHP file

[{“ID”:”1”,”Name”:”Adam”},
 {“ID”:”2”,”Name”:”Peter”}]                                                                                                                      

I then give them a

    "String ID = value.getString("ID");"
    "String Name = value.getString("Name");"

println(ID+Name);

Will give me

123456Adam
456Peter

How do I join them in one string and print in such that

123456Adam456Peter?

Thanks alot in advance!

Answers

  • print(id+name);

    here you dont have a line break -- no ln

    or result+=id+name;

  • I need to do a myPort.write

    Anyway to write with them joined? "123456Adam456Peter"

Sign In or Register to comment.