Avatar of Gontran Harvey
Gontran Harvey
 asked on

Modify json result and send it back, VBA

I have a result from an API and the way this API work, to modify even only one field, I have to send back all fields.
What I whant is to modify the fields I whant and send back the info to the API.
I know I can use string function to do that, but I whant to know if theres a library or sommething more simple that I can use to just change some part of the result.
Here what I receive from the API:

{
  "id": "a05b0aa4-d622-4bda-8a0d-0b287bc43c7a",
  "idStatus": null,
  "isUser": false,
  "company": null,
  "department": null,
  "companyID": "",
  "contactType": "Contact",
  "firstName": "test302",
  "lastName": "test2",
  "lastResults": null,
  "messengerID": null,
  "middleName": null,
  "nameSuffix": null,
  "namePrefix": null,
  "fullName": "test302 test2",
  "referredBy": null,
  "salutation": "test302",
  "jobTitle": null,
  "emailAddress": "dfgfdg£g.com",
  }

Open in new window

I need to send back the exact same thing but with some change. Exemple, I would like to change the "firstname" to something else.
VBAJSON

Avatar of undefined
Last Comment
Gontran Harvey

8/22/2022 - Mon
SOLUTION
Mike in IT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Gontran Harvey

ASKER
I did not want to go there, but if I have to I will!! thanks.
ASKER CERTIFIED SOLUTION
Gontran Harvey

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mike in IT

Does the code you wrote solve the problem?

If it doesn't are there any errors or parts that don't work the way you would like them to?
Gontran Harvey

ASKER
yes work perfectly!!
thanks
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Gontran Harvey

ASKER
Because there is no real solution exept the code I just posted