Let\'s assume you have the following HTML5
After hours of trying to solve this, I have manage to pull out the attribute. I am using 3.5.4
$("#select2").select2('data').element[0].attributes[1].nodeValue
HTML
$("#select2").select2('data').element[0].attributes[0].nodeValue --> Value Attribute
$("#select2").select2('data').element[0].attributes[1].nodeValue --> Data-URl Attribute