Your script should looks like this.
function js_enqueue_scripts() {
global $post;
$text2 = get_post_meta( $post->ID, '_load_speed_field', true );
$text3 = get_post_meta( $post->ID, '_tyre_brand_field', true );
$text4 = get_post_meta( $post->ID, '_brand_model_field', true );
$text5 = get_post_meta( $post->ID, '_run_flat_field', true );
//Put your variables inside a array
$arrayname = array(
'text3' => $text3,
'text2' => $text2
);
//Load the Script on Front-End
wp_enqueue_script( 'aws-script' );
//Localize script and pass the Data
wp_localize_script( 'aws-script', "prefix", $arrayname );
}
//Works function on wp_enqueue_scripts Hook
add_action( "wp_enqueue_scripts", "js_enqueue_scripts" );
Common.js is already enqueued by the plugin, you don’t have to re-register it again and enqueue.
After adding this code to your activated theme’s functions.php file you can access variable in any javascript file like below.
html += result.title + prefix.text3 + prefix.text2;
Please check this solution and let me know if it works.