Приветствую! Написал небольшой сценарий, но не знаю как быть дальше. 
$('span').click(function() {
			
			$(this).addClass('data-chek');
			$(this).after('+');
		});
		$('span').bind("click", function() {
			
			if ($('.data-chek').length > 0) {
				
				$('#get_result').css('display', 'block');
					$( ".data-chek" ).each(function( index ) {
						
  console.log( $( this ).attr('data-card'));
						
});
			}
			
		});
	
	$('#get_result').click(function(){
		 jQuery.ajax({
            url: "ob.php",
            method: 'post',
            data: {
           // action: 'get_all_stat_block_1',
			card_id: card_id
		 },
            success: function (response) {
          
				$('#result').html(response);
            }
        });
	});
Мну нужно полученные значения из $.each присвоить переменной card_id в массиве , чтобы потом отправить ее в ajax. Как это сделать?