質問編集履歴
1
コードの追記。
title
CHANGED
File without changes
|
body
CHANGED
@@ -34,4 +34,11 @@
|
|
34
34
|
|
35
35
|
const exampleBarcode = 1;
|
36
36
|
const name_1_taxInPrice = noName[exampleBarcode].taxInPrice;
|
37
|
+
|
38
|
+
//lodashのサンプルコード、カテゴリー毎に商品を分ける。
|
39
|
+
const eachCategoryItemsObj = {'drink':[], 'food':[]};
|
40
|
+
|
41
|
+
_.forEach(noName, (itemObj) => {
|
42
|
+
eachCategoryItemsObj[itemObj.category].push(itemObj);
|
43
|
+
});
|
37
44
|
```
|