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

Announcements

News and Announcements icon
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:
  • SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
     
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Copilot Studio

#1
Mohsin Ali Profile Picture

Mohsin Ali 481

#2
M Bilal Khan Profile Picture

M Bilal Khan 206

#3
11manish Profile Picture

11manish 201 Super User 2026 Season 2

Last 30 days Overall leaderboard