Looks like you want to use something like result = $.parseJSON(data)
. Then you can access the data with result.win_id
, for example.
As an aside, you should sanitize the input to that database query using prepare
with something like:
$wpdb->get_results( $wpdb->prepare( "SELECT * FROM wp_winners WHERE user_id=%d", $user_id ) );