Fetching roomid and jid from event called at the time of participant joining

In the below code how do I fetch jid, roomid and then pass it to the payload

function room_entered(event)
    local room = event.room;
    local payload = [[jid=jid&roomid=rid&event=roomentered]];
    local request = http.request(keyurl, {
                headers = http_headers or {},
                method = "POST",
                body = payload
        }, cb);
end