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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.