Displaying a WordPress post via a returned JSON id from a remote non-WP site

I have a WordPress site that will be pushing remote calls to a non WordPress application (one that is making predictive decisions). The system my WP site is talking to will then return a post id to me (for sake of argument here). I want to, in the simplest way possible, then load only that post id in the center content area.

I’ve tried many different plugins, but they either aren’t well documented or don’t handle decoding json that’s returned into WP and parsing it.

I just need to understand how I can have a plugin that does a remote get, receives a response, parses it according to the WordPress way (against the wp-query loop) and returns content. I have looked high and low for just an example and so far, I just feel flooded with too much info.

Does WPMU have a plugin or approach that would help me with this?

Also, here’s how far I’ve gotten in coding a plugin solution:

function testing_Get_CURL (){
$url = 'http://myremotesitenotWP/event/94303?radius=30';

$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 0);
$result = curl_exec($ch);

// Prepare the data:
$content = trim( wp_remote_retrieve_body( $result ) );
// Convert output to JSON
if (
wp_remote_retrieve_header( $result, 'content-type' )
) )
//this is where my post id comes back....not sure how to decode and see the results //and how to pluck the post out of it for loading into the middle content area
$content = json_decode( $content );

And here’sthe response if I run the CURL from the CLI:

{"0.0": {"event_id": "1179", "post_id": "1564"}}

Maybe my above code is close? But I need to know how to demo it for myself. How to load the returned content, see it change based on passing different zip codes or whatever and to see the posts hit the wp_query.