http://stackoverflow.com/questions/22001247/redis-how-to-store-associative-array-set-or-hash-or-list
I think that should answer your question
TL:DR seems like you should pass your array as a JSON string (possibly doing $redis->set())
Omg, thanks!! That was it :) After parsing the JSON via jquery I was able to post both values into the console log!
socket.on('val.update', function ( json ) {
//Do something with data
var data = JSON.parse( json );
console.log('updated: '+ data.val);
console.log('slug: '+ data.slug);
$( '.inner[data-name="'+ data.slug +'"]' ).fadeOut( 300, function() {
$( this ).html( data.val );
}).fadeIn( 300 );
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community