テキストの長さをとってそれをindexとしておく。
var pushText = "hogehoge";
// 文末に絵文字を入れるための準備
let textLength = pushText.length;
pushText += "$";
// メッセージ配列の初期化
let messageList = [];
// メッセージの作成
messageList = [{
"type": "text",
"text": pushText,
"emojis": [
{
"index": textLength,
"productId": "5ac1bfd5040ab15980c9b435",
"emojiId": "005"
}
]
},{
"type": "sticker",
"packageId": "11537",
"stickerId": "52002755"
}];