1var table_mapping = { 2 "date":"INPUT_DATE" 3 ,"user_id":"USER_ID" 4 ,"id":"COND_ID" 5 ,"save_name":"COND_NAME" 6 ,"kw":"FREE_TEXT" 7 ,"fk-01":"PICKUP_1" 8 ,"fk-02":"PICKUP_2" 9 ,"fk-03":"PICKUP_3" 10 ,"fk-04":"PICKUP_4" 11 ,"fk-05":"PICKUP_5" 12 ,"fk-06":"PICKUP_6" 13 ,"tt-01":"TSUMITATE" 14 ,"tt-02":"T_NISA" 15 ,"tt-03":"NISA" 16 ,"tt-04":"IDECO" 17 ,"tt-05":"BULL_BEAR" // Bull/Bear 18 ,"pr-01":"POINT_CASH" // Rakuten cash 0.5% redemption 19 ,"pr-02":"POINT_CARD_1" // Credit card payment 1% redemption 20 ,"pr-03":"POINT_CARD_2" // Credit card payment 0.2% redemption 21 ,"pr-04":"POINT_PROGRAM" // Investment trust balance point program target 22 ,"id-01":"INDEX" 23 ,"id-02":"NOT_INDEX" 24 ,"at-01":"TYPE_STOCK" 25 ,"at-02":"TYPE_BOND" 26 ,"at-03":"TYPE_REIT" 27 ,"at-04":"TYPE_BALANCE" 28 ,"at-05":"TYPE_OTHER" 29 ,"it-01":"REGION_JAPAN" 30 ,"it-02-01":"REGION_GLOBAL_EXC_JAPAN" 31 ,"it-02-02":"REGION_GLOBAL_INC_JAPAN" 32 ,"it-05":"REGION_N_AMERICA" 33 ,"it-07":"REGION_EURO" 34 ,"it-03":"REGION_ASIA" 35 ,"it-03-01":"REGION_INDIA" 36 ,"it-03-02":"REGION_INDONESIA" 37 ,"it-03-03":"REGION_CHINA_HK" 38 ,"it-04":"REGION_OCEANIA" 39 ,"it-08":"REGION_EMARGING" 40 ,"it-06":"REGION_MID_S_AMERICA" 41 ,"fs-01-01":"SCORE_1Y_1" 42 ,"fs-01-02":"SCORE_1Y_2" 43 ,"fs-01-03":"SCORE_1Y_3" 44 ,"fs-01-04":"SCORE_1Y_4" 45 ,"fs-01-05":"SCORE_1Y_5" 46 ,"fs-02-01":"SCORE_3Y_1" 47 ,"fs-02-02":"SCORE_3Y_2" 48 ,"fs-02-03":"SCORE_3Y_3" 49 ,"fs-02-04":"SCORE_3Y_4" 50 ,"fs-02-05":"SCORE_3Y_5" 51 ,"fs-03-01":"SCORE_5Y_1" 52 ,"fs-03-02":"SCORE_5Y_2" 53 ,"fs-03-03":"SCORE_5Y_3" 54 ,"fs-03-04":"SCORE_5Y_4" 55 ,"fs-03-05":"SCORE_5Y_5" 56 ,"fs-04-01":"SCORE_10Y_1" 57 ,"fs-04-02":"SCORE_10Y_2" 58 ,"fs-04-03":"SCORE_10Y_3" 59 ,"fs-04-04":"SCORE_10Y_4" 60 ,"fs-04-05":"SCORE_10Y_5" 61 ,"rt-02-01":"RETURN_6M_1" 62 ,"rt-02-02":"RETURN_6M_2" 63 ,"rt-02-03":"RETURN_6M_3" 64 ,"rt-02-04":"RETURN_6M_4" 65 ,"rt-03-01":"RETURN_1Y_1" 66 ,"rt-03-02":"RETURN_1Y_2" 67 ,"rt-03-03":"RETURN_1Y_3" 68 ,"rt-03-04":"RETURN_1Y_4" 69 ,"rt-04-01":"RETURN_3Y_1" 70 ,"rt-04-02":"RETURN_3Y_2" 71 ,"rt-04-03":"RETURN_3Y_3"
72 ,"rt-04-04":"RETURN_3Y_4" 73 ,"rt-05-01":"RETURN_5Y_1" 74 ,"rt-05-02":"RETURN_5Y_2" 75 ,"rt-05-03":"RETURN_5Y_3" 76 ,"rt-05-04":"RETURN_5Y_4" 77 ,"rt-06-01":"RETURN_10Y_1" 78 ,"rt-06-02":"RETURN_10Y_2" 79 ,"rt-06-03":"RETURN_10Y_3" 80 ,"rt-06-04":"RETURN_10Y_4" 81 ,"rt-07-01":"RETURN_20Y_1" 82 ,"rt-07-02":"RETURN_20Y_2" 83 ,"rt-07-03":"RETURN_20Y_3" 84 ,"rt-07-04":"RETURN_20Y_4" 85 ,"rt-08-01":"RETURN_ALL_1" 86 ,"rt-08-02":"RETURN_ALL_2" 87 ,"rt-08-03":"RETURN_ALL_3" 88 ,"rt-08-04":"RETURN_ALL_4" 89 ,"sr-01-01":"SR_1Y_1" 90 ,"sr-01-02":"SR_1Y_2" 91 ,"sr-01-03":"SR_1Y_3" 92 ,"sr-01-04":"SR_1Y_4" 93 ,"sr-02-01":"SR_3Y_1" 94 ,"sr-02-02":"SR_3Y_2" 95 ,"sr-02-03":"SR_3Y_3" 96 ,"sr-02-04":"SR_3Y_4" 97 ,"sr-03-01":"SR_5Y_1" 98 ,"sr-03-02":"SR_5Y_2" 99 ,"sr-03-03":"SR_5Y_3" 100 ,"sr-03-04":"SR_5Y_4" 101 ,"sr-04-01":"SR_10Y_1" 102 ,"sr-04-02":"SR_10Y_2" 103 ,"sr-04-03":"SR_10Y_3" 104 ,"sr-04-04":"SR_10Y_4" 105 ,"sr-05-01":"SR_20Y_1" 106 ,"sr-05-02":"SR_20Y_2" 107 ,"sr-05-03":"SR_20Y_3" 108 ,"sr-05-04":"SR_20Y_4" 109 ,"sd-01-01":"SD_1Y_1" 110 ,"sd-01-02":"SD_1Y_2" 111 ,"sd-01-03":"SD_1Y_3" 112 ,"sd-01-04":"SD_1Y_4" 113 ,"sd-01-05":"SD_1Y_5" 114 ,"sd-02-01":"SD_3Y_1" 115 ,"sd-02-02":"SD_3Y_2" 116 ,"sd-02-03":"SD_3Y_3" 117 ,"sd-02-04":"SD_3Y_4" 118 ,"sd-02-05":"SD_3Y_5" 119 ,"sd-03-01":"SD_5Y_1" 120 ,"sd-03-02":"SD_5Y_2" 121 ,"sd-03-03":"SD_5Y_3" 122 ,"sd-03-04":"SD_5Y_4" 123 ,"sd-03-05":"SD_5Y_5" 124 ,"sd-04-01":"SD_10Y_1" 125 ,"sd-04-02":"SD_10Y_2" 126 ,"sd-04-03":"SD_10Y_3" 127 ,"sd-04-04":"SD_10Y_4" 128 ,"sd-04-05":"SD_10Y_5" 129 ,"sd-05-01":"SD_20Y_1" 130 ,"sd-05-02":"SD_20Y_2" 131 ,"sd-05-03":"SD_20Y_3" 132 ,"sd-05-04":"SD_20Y_4" 133 ,"sd-05-05":"SD_20Y_5" 134 ,"cf-01":"SETTLE_12" 135 ,"cf-02":"SETTLE_6" 136 ,"cf-03":"SETTLE_2" 137 ,"cf-04":"SETTLE_4" 138 ,"cs-01":"CURR_SELECT_TRUE" 139 ,"cs-02":"CURR_SELECT_FALSE" 140 ,"ch-01":"CURR_HEDGE_TRUE" 141 ,"ch-02":"CURR_HEDGE_FALSE" 142 ,"ch-03":"CURR_HEDGE_IN_CASE" 143 ,"ch-04":"CURR_HEDGE_PARTIAL" 144 ,"op-01":"PERIOD_1Y" 145 ,"op-02":"PERIOD_3Y" 146 ,"op-03":"PERIOD_5Y" 147 ,"op-04":"PERIOD_10Y" 148 ,"op-05":"PERIOD_20Y" 149 ,"op-06":"PERIOD_20Y_ABOVE" 150 ,"result-count":"result-count" 151 ,"sim-01":"SIMULATION" 152 ,"sim-02":"OTHERS1" 153} 154 155function GenerateJSONObject(obj, key, value) 156{ 157 var name = table_mapping[key]; 158 159 if(name !== undefined && !(key in obj)){ 160 obj[name] = value; 161 }else{ 162 console.log("GenerateJSONObject: not found [" + key + "]"); 163 return "not found"; 164 } 165} 166 167function FindDBMappingKeyByValue(value) 168{ 169 return Object.keys(table_mapping).filter(function(key) { return table_mapping[key] === value; })[0]; 170} 171 172function GenerateJSONObjectCustomText(obj, value, text) 173{ 174 obj[text] = value.join(","); 175} 176 177 178/* 179console.log(FindDBMappingKeyByValue("PERIOD_1Y")); 180//console.log(table_mapping"user_id"); 181let json = new Object(); 182GenerateJSONObject(json, "tt-01","1"); 183//GenerateJSONObject(json, "tt-01","-"); 184GenerateJSONObject(json, "at-03","1"); 185GenerateJSONObject(json, "fs-01-01","1"); 186 187console.log(JSON.stringify(json)); 188*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.