Моя схема PB выглядит следующим образом:
message ProductRecommendationReply {
string productid = 1;
message recommendationlist{
string recommendedproductid = 1;
string recommendedproductname = 2;
string recommendedproductprice = 3;
}
}
На стороне сервера (node.js) я пытаюсь установить свойства, как показано ниже:
var message = {
productid: '',
recommendationlist: []
};
message.productid = result_list.product_Id;
message.recommendationlist.recommendedproductid = result_list.recomendation_list[0].recommended_product_id;
message.recommendationlist.recommendedproductname = result_list.recomendation_list[0].recommended_product_name;
message.recommendationlist.recommendedproductprice = result_list.recomendation_list[0].recommended_product_price;
callback(null,message); // send the result back to consumer.
Проблема это при отладке стороны cl inet, значение присваивается только productid
, пусто recommendationlist
.
Как правильно назначить значение вложенному сообщению?