Return an array from get_terms and store as JavaScript array for search autocomplete

Solved it simply using:

$json = array();

    $terms = get_terms( 'state' );

    foreach ( $terms as $term ) {
        $json[]=array( 'value'=> $term->name );
    }

    echo json_encode($json)

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş