How can I update a value of a field depending on outside source?

you can read your file using standard PHP:

$value = json_decode( file_get_contents( 'path/to/your/file.json' ) );

Then you can use WordPress function to update post meta:

update_post_meta( $post_id, $meta_name, $value, $prev_value );

$post_id = ID of the post you want to update
$meta_name = name of the meta field you want to update
$value = new value
$prev_value = only posts with this value will be updated (so if you want to only switch yes to no, you can put “yes” there.

If you want to use SQL:

global $wpdb;
$wpdb->query( 
    $wpdb->prepare( 'UPDATE ' $wpdb->prefix . 'postmeta ON meta_value = %s WHERE post_id IN (%s);', $value, join( ',', $post_ids ) )
);

$post_ids = array of all post IDs that should be updated
$value = your new value