Ajax out substring to fix weird double json error