I have a page (ASP classic) which has a recordset with data.
recordset name: rs_contact
field1: FName
field2: LName
field3: email
This is the first time I will be doing this so a good explanation would be very much appreciated.
I need to pass this data to a JSON format so that I can the post it to an URL (to be used by an API)
The page is in classic ASP. The data I need to pass is in the format below. This considering I only got one result in my recordset and the values returned are:
FirstNm = 'Aleks'
LastNm = 'Demo'
email = 'support@domain.com'
Those values somehow need to be turned into this JSON
We have to consider there may be more than one result from the recordset, another set of values would be:
Alma
Doe
alma@domain.com
etc.
This is the JSON file example I have to create:
{
"first_name": "Aleks",
"last_name": "Demo",
"email_addresses": [
{
"email_address": "support@domain.com"
}
]
}
Once this is created I need to post the data to an URL that is also stored in a recordset.
The URL will require a token as parameter, so I need to pass 2 parameters, the first part is the URL and the second is the token.
something like: https://<%=url("value")%>?token?<%=token("value")%>
Example:
http://myurl/contacts/add?token=ada23-4234-234234-2
We can break this down in those two parts. One is taking the recordset info and converting it into JSON. And the second part is posting this JSON to the URL.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Fellow title is reserved for select members who demonstrate sustained contributions, industry leadership, and outstanding performance. We will announce the experts being inducted into the Experts Exchange Fellowship during the annual Expert Awards, but unlike other awards, Fellow is a lifelong status. This title may not be given every year if there are no obvious candidates.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.