Return a json object that has the data you want. Fist you build an array and then you return the json encode value. Something like this.
$return = array(
'title' => $title__singular . '_title',
'next_id' => $rowNumber+1
)
echo json_encode($return);
exit;