{{ item.getPrice() }}Twig テンプレートがあり、読み込みが完了したらアイテムの価格を追加したいと考えています。urlこれをAJAXを使ってjQueryでやろうと思っていたのですが、変数を値に代入する方法と{{ item.getPrice() }}変数に代入する方法がわかりませんofferPrice。
$.ajax ({
url: {{ item.getPrice() | json_encode | raw }}
}).done( function() {
$('#price').append(offerPrice);
});