Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
LP280388
Resolver II
Resolver II

Extract Text after each iteration

Hi Team,

 

I have the data in the below format from DB.  I need to extract the text after every "SectionHdr",  "QuestionHdr", "QuestionTxt" and "SectionRe".  Please help me as i'm unsure on how to iterate multiple times within the same text.  I have also added a sample of Output im trying to achieve.

 

Column1  (Input)

 

[
{
        "Questionnaire": [
            {
                "QuestionAIs": "vvv; ooo",
                "QuestionAf": "rrrr; ppp; aaa ",
                "QuestionDr": "10",
                "QuestionHdr": "header1",
                "QuestionID": "af-afddfadsf",
                "QuestionSts": "dasdff",
                "QuestionTxt": "text1"
            },
            {
                "QuestionAIs": "vvv; ooo",
                "QuestionAf": "rrrr; ppp; aaa ",
                "QuestionDr": "10",
                "QuestionHdr": "header2",
                "QuestionID": "af-afddfadsf",
                "QuestionSts": "dasdff",
                "QuestionTxt": "text2"
            },
{
                "QuestionAIs": "vvv; ooo",
                "QuestionAf": "rrrr; ppp; aaa ",
                "QuestionDr": "10",
                "QuestionHdr": "header3",
                "QuestionID": "af-afddfadsf",
                "QuestionSts": "dasdff",
                "QuestionTxt": "text3"
            },
            {
                "QuestionAIs": "vvv; ooo",
                "QuestionAf": "rrrr; ppp; aaa ",
                "QuestionDr": "10",
                "QuestionHdr": "header4",
                "QuestionID": "af-afddfadsf",
                "QuestionSts": "dasdff",
                "QuestionTxt": "text4"
            }
        ],
        "SectionCs": "",
        "SectionDr": "20",
        "SectionHdr": "Sec1",
        "SectionID": "wefwe-1001",
        "SectionRe": "N"
    },
    {
        "Questionnaire": [
            {
                "QuestionAIs": "vvv; ooo",
                "QuestionAf": "rrrr; ppp; aaa ",
                "QuestionDr": "10",
                "QuestionHdr": "header1",
                "QuestionID": "af-afddfadsf",
                "QuestionSts": "dasdff",
                "QuestionTxt": "text5"
            },
            {
                "QuestionAIs": "vvv; ooo",
                "QuestionAf": "rrrr; ppp; aaa ",
                "QuestionDr": "10",
                "QuestionHdr": "header2",
                "QuestionID": "af-afddfadsf",
                "QuestionSts": "dasdff",
                "QuestionTxt": "text6"
            }
        ],
        "SectionCs": "",
        "SectionDr": "20",
        "SectionHdr": "Sec3",
        "SectionID": "wefwe-1001",
        "SectionRe": "y"
    },
 
 
    {
        "Questionnaire": [
            {
                "QuestionAIs": "vvv; ooo",
                "QuestionAf": "rrrr; ppp; aaa ",
                "QuestionDr": "10",
                "QuestionHdr": "header1",
                "QuestionID": "af-afddfadsf",
                "QuestionSts": "dasdff",
                "QuestionTxt": "text7"
            }
        ],
        "SectionCs": "",
        "SectionDr": "20",
        "SectionHdr": "Sec4",
        "SectionID": "wefwe-1001",
        "SectionRe": "y"
    }
]


Output
 

1. Sec1 :
header1 :
- text1
header2 :
- text2
- text2.1
header3 :
- text3
header4 :
- text4

SectionRe : N

2. Sec2 :
header1 :
- text6
header2 :
- text7

SectionRe : y

3. Sec3 :
header1 :
- text8

SectionRe : y

2 REPLIES 2
LP280388
Resolver II
Resolver II

Hi Team, Please help on the above request.

LP280388
Resolver II
Resolver II

Hi Team, Please help on the above request.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.