<?php
function online_custom_rest(){

    register_rest_field(array('markets','venders','other_services','tlg_channels',"top_forums"), '_isOnline', array(
            'get_callback' => function (){
	            global $post;
	            $isOnine = get_post_meta($post->ID, '_isOnline',true);
                wp_reset_postdata();
                return $isOnine;
            }
    ));
}
add_action('rest_api_init', 'online_custom_rest');