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 / Power Automate / Get Value from JSON, t...
Power Automate
Unanswered

Get Value from JSON, then display value in a Time Format

(1) ShareShare
ReportReport
Posted on by 30

Hi There, 

I am getting better at building my flows, just parsed my first JSON that was inside another array (Whoa ... I got confused just writing that). But now I have run into a problem with formatting the date time value. 

The value I pull from the JSON is "PublishedTime" with a value of "2018-11-27T22:48:00Z".

The problem is that when I try to use the expression builder I can't access the "PublishedTime" value/identifer.

The only thing availible from the Parse JSON action is "body". 

I am kind of lost ... 

Thanks, Mike

Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    on at
    Re: Get Value from JSON, then display value in a Time Format

    Hi @mikedumka,

     

    Could you please share a screenshot of the configuration of your flow?

    Could you please share more details about the JSON that you mentioned.

     

    I have made a test on my side and my flow works fine to get the value in the JSON as below:

     

    The JSON:

    [
     {
     "Title": "1",
     "PublishedTime": "2018-11-27T08:00:00Z"
     }
    ]

    The flow:

    Capture.PNG 

     

    Run history:

    Capture.PNG

     

    Please share more details so we would try to provide a proper workaround for you.

     

    Best regards,

    Alice

  • mikedumka Profile Picture
    30 on at
    Re: Get Value from JSON, then display value in a Time Format

    Thanks so much for the help ... 

     

    I should have explained more, I can do everything you laid out, but when it comes to the expression builder, I want to format the time. So I have this ... which has the correct JSON value "PublishedTime"

     

    2018-12-06_10-44-29.png

     

    But as soon as I go into the "Expression" tab and try to format the time, the JSON value changes to "body" like below ... 

    2018-12-06_10-48-10.png

     

    What is going on with this ... and again, thank you so much for the help!

     

  • Verified answer
    v-yuazh-msft Profile Picture
    on at
    Re: Get Value from JSON, then display value in a Time Format

    Hi @mikedumka,

     

    You could add a Compose action inside the Apply to each, and then refer to screenshot below to create the flow:

    Capture.PNG

     

    The expression in the Body field as below:

    formatDateTime(outputs('Compose'),'yyyy-MM-dd')

    Best regards,

    Alice

  • mikedumka Profile Picture
    30 on at
    Re: Get Value from JSON, then display value in a Time Format
    I tried to accept this as a solution but am getting some strange authentication error, but thank you SO much for yelp. Worked like a charm. My only question is why do I have to use 'compose' rather than working with the value directly?
  • PieterVeenstra Profile Picture
    13 on at
    Re: Get Value from JSON, then display value in a Time Format
    HI mike, You can do this an easy way. If you add the Dynamic content that you want in any part of an action ( this could be a compose). Then click in this field . Then Ctrl A and the Ctrl V it into the expressions editor then you will get the json to query what you want. Important note for this approach you will need to remove the @ sign and the curly brackets {} around the expression that you actually want.

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 > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard