I have a ul menu from which I want to retireve certain information

<ul id="form_builder_sortable" class="sortable rightDiv session1">
<li class="draggable ui-state-highlight item id10">Maths<button class="delbtn">&amp;times</button></li>

We will write a custom essay sample on

Extract id value from css class to javascript variable specifically for you

for only $13.90/page

Order Now

I have a function in javascript:

function getSessionDatas(){
var sessions = [];
$('.rightDiv').each(function( index ) {
var session = $.trim($(this).text().slice(0,-1)).split("×");
var sessionData = [];
for (var i = 0; i &lt; session.length; i++) {
var s = {subjectOrder:i, subjectID:subs[session[i]]};
var ses = {sessionNo:index,sessionData:sessionData};


var s = {subjectOrder:i, subjectID:<get id here>};

I want to assign the subject id according to the class of the <li> item, in this case in the class there is an id10. How can i assign the subjectID to 10 in this case?