Fetching latest posts from 2 different WP installations

I’d use the REST API to get the latest 10 posts from each install, then combine the two arrays, sort them by the date, and then only use the latest 10 results.

$editorials = wp_remote_get( 'https://www.example.com/editorials/wp-json/wp/v2/posts/' );
$news       = wp_remote_get( 'https://www.example.com/news/wp-json/wp/v2/posts/' );

$editorials = json_decode( $editorials[ 'body' ] );
$news       = json_decode( $news[ 'body' ] );

$all = array_merge( $editorials, $news );
//* The spaceship operator requires PHP > 7.0
usort( $all, function( $a, $b ) { return $a->date <=> $b->date; } );
$all = array_slice( $all, 0, 10 );

//* Do something useful with the combined array of posts