web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Create JSON array out ...
Copilot Studio
Unanswered

Create JSON array out of user responses in Copilot Studio

(0) ShareShare
ReportReport
Posted on by
Hi All,
 
I am trying to create JSON array out of the user responses. How can we do that in Copilot studio? 
 
Any help will be much appreciated!
 
Thank you.
Categories:
I have the same question (0)
  • SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    Create JSON array out of user responses in Copilot Studio
     
    Create a prompt action in Copilot Studio to gather input from the user.
    Use a structured approach to capture multiple responses, such as using placeholders or asking sequential questions.
    Use the input from the user and structure it into JSON format.
     
    Define a backend or inline function to parse and store the responses dynamically.
    function createJsonArray(responses) {
        const jsonArray = responses.map(response => ({
            key: response.key,
            value: response.value
        }));
        return JSON.stringify(jsonArray);
    }
     
    Use an Action in Copilot Studio to concatenate or structure the responses into a JSON array dynamically.
    [
        {
            "name": "John Doe",
            "email": "johndoe@example.com",
            "phone": "123-456-7890"
        },
        {
            "name": "Jane Smith",
            "email": "janesmith@example.com",
            "phone": "987-654-3210"
        }
    ]
     
    save it to a database, or send it to an API endpoint.
     
    pls try and let me know if you need more details. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 265 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 257 Super User 2025 Season 2

#3
Sam_Fawzi Profile Picture

Sam_Fawzi 84 Super User 2025 Season 2

Last 30 days Overall leaderboard