forked from ibmdevelopermx/PersonalityInsights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Estructurador.js
414 lines (311 loc) · 17 KB
/
Estructurador.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
function Estructurador(data){
x = data;
var apertura = x.personality[0].name;
var aperturaP= x.personality[0].percentile;
var audacia = x.personality[0].children[0].name;
var audaciaP = x.personality[0].children[0].percentile;
var inAr = x.personality[0].children[1].name;
var inArP = x.personality[0].children[1].percentile;
var emocional = x.personality[1].children[2].name;
var emocionalP = x.personality[1].children[2].percentile;
var imagin = x.personality[0].children[3].name;
var imaginP = x.personality[0].children[3].percentile;
var intelec = x.personality[0].children[4].name;
var intelecP = x.personality[0].children[4].percentile;
var desafAut = x.personality[0].children[5].name;
var desafAutP = x.personality[0].children[5].percentile;
var res = x.personality[1].name;
var resP = x.personality[1].percentile;
var necex = x.personality[1].children[0].name;
var necexP = x.personality[1].children[0].percentile;
var caut = x.personality[1].children[1].name;
var cautP = x.personality[1].children[1].percentile;
var ob = x.personality[1].children[2].name;
var obP = x.personality[1].children[2].percentile;
var dis = x.personality[1].children[3].name;
var disP = x.personality[1].children[3].percentile;
var autodis = x.personality[1].children[4].name;
var autodisP = x.personality[1].children[4].percentile;
var autoEf = x.personality[1].children[5].name;
var autoEfP = x.personality[1].children[5].percentile;
var extro = x.personality[2].name;
var extroP = x.personality[2].percentile;
var act = x.personality[2].children[0].name;
var actP = x.personality[2].children[0].percentile;
var seg = x.personality[2].children[1].name;
var segP = x.personality[2].children[1].percentile;
var aleg = x.personality[2].children[2].name;
var alegP = x.personality[2].children[2].percentile;
var busqem = x.personality[2].children[3].name;
var busqemP = x.personality[2].children[3].percentile;
var sim = x.personality[2].children[4].name;
var simP = x.personality[2].children[4].percentile;
var sociab = x.personality[2].children[5].name;
var sociabP = x.personality[2].children[5].percentile;
var amab = x.personality[3].name;
var amabP = x.personality[3].percentile;
var altru = x.personality[3].children[0].name;
var altruP = x.personality[3].children[0].percentile;
var coo = x.personality[3].children[1].name;
var cooP = x.personality[3].children[1].percentile;
var modes = x.personality[3].children[2].name;
var modesP = x.personality[3].children[2].percentile;
var intransi = x.personality[3].children[3].name;
var intransiP = x.personality[3].children[3].percentile;
var compas = x.personality[3].children[4].name;
var compasP = x.personality[3].children[4].percentile;
var confianzab = x.personality[3].children[5].name;
var confianzaP = x.personality[3].children[5].percentile;
var rango = x.personality[4].name;
var rangoP = x.personality[4].percentile;
var vehem = x.personality[4].children[0].name;
var vehemP = x.personality[4].children[0].percentile;
var preoc = x.personality[4].children[1].name;
var preocP = x.personality[4].children[1].percentile;
var mel = x.personality[4].children[2].name;
var melP = x.personality[4].children[2].percentile;
var desm = x.personality[4].children[3].name;
var desmP = x.personality[4].children[3].percentile;
var tim = x.personality[4].children[4].name;
var timP = x.personality[4].children[4].percentile;
var susTen = x.personality[4].children[5].name;
var susTenP = x.personality[4].children[5].percentile;
var rango = x.personality[4].name;
var rangoP = x.personality[4].percentile;
var vehem = x.personality[4].children[0].name;
var vehemP = x.personality[4].children[0].percentile;
var preoc = x.personality[4].children[1].name;
var preocP = x.personality[4].children[1].percentile;
var mel = x.personality[4].children[2].name;
var melP = x.personality[4].children[2].percentile;
var desm = x.personality[4].children[3].name;
var desmP = x.personality[4].children[3].percentile;
var tim = x.personality[4].children[4].name;
var timP = x.personality[4].children[4].percentile;
var susTen = x.personality[4].children[5].name;
var susTenP = x.personality[4].children[5].percentile;
var desafio = x.needs[0].name;
var desafioP = x.needs[0].percentile;
var famil = x.needs[1].name;
var familP = x.needs[1].percentile;
var curios = x.needs[2].name;
var curiosP = x.needs[2].percentile;
var entus = x.needs[3].name;
var entusP = x.needs[3].percentile;
var armon = x.needs[4].name;
var armonP = x.needs[4].percentile;
var ideal = x.needs[5].name;
var idealP = x.needs[5].percentile;
var libertad = x.needs[6].name;
var libertadP = x.needs[6].percentile;
var amor = x.needs[7].name;
var amorP = x.needs[7].percentile;
var practicidad = x.needs[8].name;
var practicidadP = x.needs[8].percentile;
var autoex = x.needs[9].name;
var autoexP = x.needs[9].percentile;
var estab = x.needs[10].name;
var estabP = x.needs[10].percentile;
var estruct = x.needs[11].name;
var estructP = x.needs[11].percentile;
var conserv = x.values[0].name;
var conservP = x.values[0].percentile;
var aperCam = x.values[1].name;
var aperCamP = x.values[1].percentile;
var hedo = x.values[2].name;
var hedoP = x.values[2].percentile;
var superac = x.values[3].name;
var superacP = x.values[3].percentile;
var autotrac = x.values[4].name;
var autotracP = x.values[4].percentile;
var auto = x.consumption_preferences[0].consumption_preferences[0].name;
var autoS = x.consumption_preferences[0].consumption_preferences[0].score;
var autos = x.consumption_preferences[0].consumption_preferences[1].name;
var autosS = x.consumption_preferences[0].consumption_preferences[1].score;
var ropac = x.consumption_preferences[0].consumption_preferences[2].name;
var ropacS = x.consumption_preferences[0].consumption_preferences[2].score;
var ropas = x.consumption_preferences[0].consumption_preferences[3].name;
var ropasS = x.consumption_preferences[0].consumption_preferences[3].score;
var ropacom = x.consumption_preferences[0].consumption_preferences[4].name;
var ropacomS = x.consumption_preferences[0].consumption_preferences[4].score;
var nombreMarc = x.consumption_preferences[0].consumption_preferences[5].name;
var nombreMarcS = x.consumption_preferences[0].consumption_preferences[5].score;
var utilidad = x.consumption_preferences[0].consumption_preferences[6].name;
var utilidadS = x.consumption_preferences[0].consumption_preferences[6].score;
var publLinea = x.consumption_preferences[0].consumption_preferences[7].name;
var publLineaS = x.consumption_preferences[0].consumption_preferences[7].score;
var redeSoc = x.consumption_preferences[0].consumption_preferences[8].name;
var redeSocS = x.consumption_preferences[0].consumption_preferences[8].score;
var fam = x.consumption_preferences[0].consumption_preferences[8].name;
var famS = x.consumption_preferences[0].consumption_preferences[8].score;
var cap = x.consumption_preferences[0].consumption_preferences[9].name;
var capS = x.consumption_preferences[0].consumption_preferences[9].score;
var tarjCred = x.consumption_preferences[0].consumption_preferences[10].name;
var tarjCredS = x.consumption_preferences[0].consumption_preferences[10].score;
var tarjCred = x.consumption_preferences[0].consumption_preferences[10].name;
var tarjCredS = x.consumption_preferences[0].consumption_preferences[10].score;
var comerFuera = x.consumption_preferences[1].consumption_preferences[0].name;
var comerFueraS = x.consumption_preferences[1].consumption_preferences[0].score;
var membresiaGym = x.consumption_preferences[1].consumption_preferences[1].name;
var membresiaGymS = x.consumption_preferences[1].consumption_preferences[1].score;
var actividadesAireLibre = x.consumption_preferences[1].consumption_preferences[2].name;
var actividadesAireLibreS = x.consumption_preferences[1].consumption_preferences[2].score;
var preferenciasAmb = x.consumption_preferences[2].consumption_preferences[0].name;
var preferenciasAmbS = x.consumption_preferences[2].consumption_preferences[0].score;
var empren = x.consumption_preferences[3].consumption_preferences[0].name;
var emprenS = x.consumption_preferences[3].consumption_preferences[0].score;
var cineRom = x.consumption_preferences[4].consumption_preferences[0].name;
var cineRomS = x.consumption_preferences[4].consumption_preferences[0].score;
var cineAven = x.consumption_preferences[4].consumption_preferences[1].name;
var cineAvenS = x.consumption_preferences[4].consumption_preferences[1].score;
var cineTerror = x.consumption_preferences[4].consumption_preferences[2].name;
var cineTerrorS = x.consumption_preferences[4].consumption_preferences[2].score;
var cineMusical = x.consumption_preferences[4].consumption_preferences[3].name;
var cineMusicalS = x.consumption_preferences[4].consumption_preferences[3].score;
var cineHistor = x.consumption_preferences[4].consumption_preferences[4].name;
var cineHistorS = x.consumption_preferences[4].consumption_preferences[4].score;
var cineFicc = x.consumption_preferences[4].consumption_preferences[5].name;
var cineFiccS = x.consumption_preferences[4].consumption_preferences[5].score;
var cineBel = x.consumption_preferences[4].consumption_preferences[6].name;
var cineBelS = x.consumption_preferences[4].consumption_preferences[6].score;
var cineDrama = x.consumption_preferences[4].consumption_preferences[5].name;
var cineDramaS = x.consumption_preferences[4].consumption_preferences[5].score;
var cineAccion = x.consumption_preferences[4].consumption_preferences[5].name;
var cineAccionS = x.consumption_preferences[4].consumption_preferences[5].score;
var cineDoc = x.consumption_preferences[4].consumption_preferences[5].name;
var cineDocS = x.consumption_preferences[4].consumption_preferences[5].score;
var rap = x.consumption_preferences[5].consumption_preferences[0].name;
var rapS = x.consumption_preferences[5].consumption_preferences[0].score;
var country = x.consumption_preferences[5].consumption_preferences[1].name;
var countryS = x.consumption_preferences[5].consumption_preferences[1].score;
var rb = x.consumption_preferences[5].consumption_preferences[2].name;
var rbS = x.consumption_preferences[5].consumption_preferences[2].score;
var concierto = x.consumption_preferences[5].consumption_preferences[3].name;
var conciertoS = x.consumption_preferences[5].consumption_preferences[3].score;
var musico = x.consumption_preferences[5].consumption_preferences[4].name;
var musicoS = x.consumption_preferences[5].consumption_preferences[4].score;
var latina = x.consumption_preferences[5].consumption_preferences[5].name;
var latinaS = x.consumption_preferences[5].consumption_preferences[5].score;
var rock = x.consumption_preferences[5].consumption_preferences[6].name;
var rockS = x.consumption_preferences[5].consumption_preferences[6].score;
var clasica = x.consumption_preferences[5].consumption_preferences[7].name;
var clasicaS = x.consumption_preferences[5].consumption_preferences[7].score;
var frecLec = x.consumption_preferences[6].consumption_preferences[0].name;
var frecLecS = x.consumption_preferences[6].consumption_preferences[0].score;
var revEntr = x.consumption_preferences[6].consumption_preferences[1].name;
var revEntrS = x.consumption_preferences[6].consumption_preferences[1].score;
var librosNoFicc = x.consumption_preferences[6].consumption_preferences[2].name;
var librosNoFiccS = x.consumption_preferences[6].consumption_preferences[2].score;
var librosInvFinanciera = x.consumption_preferences[6].consumption_preferences[3].name;
var librosInvFinancieraS = x.consumption_preferences[6].consumption_preferences[3].score;
var librosAutoBio = x.consumption_preferences[6].consumption_preferences[4].name;
var librosAutoBioS = x.consumption_preferences[6].consumption_preferences[4].score;
var volun = x.consumption_preferences[7].consumption_preferences[0].name;
var volunS = x.consumption_preferences[7].consumption_preferences[0].score;
var y = {
[apertura]: {N: String(aperturaP)},
[audacia]: {N: String(audaciaP)},
[inAr]: {N: String(inArP)},
[emocional]: {N: String(emocionalP)},
[imagin]: {N: String(imaginP)},
[intelec]: {N: String(intelecP)},
[desafAut]: {N: String(desafAutP)},
[res]: {N: String(resP)},
[necex]: {N: String(necexP)},
[caut]: {N: String(cautP)},
[ob]: {N: String(obP)},
[dis]: {N: String(disP)},
[autodis]: {N: String(autodisP)},
[autoEf]: {N: String(autoEfP)},
[extro]: {N: String(extroP)},
[act]: {N: String(actP)},
[seg]: {N: String(segP)},
[aleg]: {N: String(alegP)},
[busqem]: {N: String(busqemP)},
[sim]: {N: String(simP)},
[sociab]: {N: String(sociabP)},
[amab]: {N: String(amabP)},
[altru]: {N: String(altruP)},
[coo]: {N: String(cooP)},
[modes]: {N: String(modesP)},
[intransi]: {N: String(intransiP)},
[compas]: {N: String(compasP)},
[confianzab]: {N: String(confianzaP)},
[rango]: {N: String(rangoP)},
[vehem]: {N: String(vehemP)},
[preoc]: {N: String(preocP)},
[mel]: {N: String(melP)},
[desm]: {N: String(desmP)},
[tim]: {N: String(timP)},
[susTen]: {N: String(susTenP)},
[rango]: {N: String(rangoP)},
[vehem]: {N: String(vehemP)},
[preoc]: {N: String(preocP)},
[mel]: {N: String(melP)},
[desm]: {N: String(desmP)},
[tim]: {N: String(timP)},
[susTen]: {N: String(susTenP)},
[desafio]: {N: String(desafioP)},
[famil]: {N: String(familP)},
[curios]: {N: String(curiosP)},
[entus]: {N: String(entusP)},
[armon]: {N: String(armonP)},
[ideal]: {N: String(idealP)},
[libertad]: {N: String(libertadP)},
[amor]: {N: String(amorP)},
[practicidad]: {N: String(practicidadP)},
[autoex]: {N: String(autoexP)},
[estab]: {N: String(estabP)},
[estruct]: {N: String(estructP)},
[conserv]: {N: String(conservP)},
[aperCam]: {N: String(aperCamP)},
[hedo]: {N: String(hedoP)},
[superac]: {N: String(superacP)},
[autotrac]: {N: String(autotracP)},
[auto]: {N: String(autoS)},
[autos]: {N: String(autosS)},
[ropac]: {N: String(ropacS)},
[ropas]: {N: String(ropasS)},
[ropacom]: {N: String(ropacomS)},
[nombreMarc]: {N: String(nombreMarcS)},
[utilidad]: {N: String(utilidadS)},
[publLinea]: {N: String(publLineaS)},
[redeSoc]: {N: String(redeSocS)},
[fam]: {N: String(famS)},
[cap]: {N: String(capS)},
[tarjCred]: {N: String(tarjCredS)},
[comerFuera]: {N: String(comerFueraS)},
[membresiaGym]: {N: String(membresiaGymS)},
[actividadesAireLibre]: {N: String(actividadesAireLibreS)},
[preferenciasAmb]: {N: String(preferenciasAmbS)},
[empren]: {N: String(emprenS)},
[cineRom]: {N: String(cineRomS)},
[cineAven]: {N: String(cineAvenS)},
[cineTerror]: {N: String(cineTerrorS)},
[cineMusical]: {N: String(cineMusicalS)},
[cineHistor]: {N: String(cineHistorS)},
[cineFicc]: {N: String(cineFiccS)},
[cineBel]: {N: String(cineBelS)},
[cineDrama]: {N: String(cineDramaS)},
[cineAccion]: {N: String(cineAccionS)},
[cineDoc]: {N: String(cineDocS)},
[rap]: {N: String(rapS)},
[country]: {N: String(countryS)},
[rb]: {N: String(rbS)},
[concierto]: {N: String(conciertoS)},
[musico]: {N: String(musicoS)},
[latina]: {N: String(latinaS)},
[rock]: {N: String(rockS)},
[clasica]: {N: String(clasicaS)},
[frecLec]: {N: String(frecLecS)},
[revEntr]: {N: String(revEntrS)},
[librosNoFicc]: {N: String(librosNoFiccS)},
[librosInvFinanciera]: {N: String(librosInvFinancieraS)},
[librosAutoBio]: {N: String(librosAutoBioS)},
[volun]: {N: String(volunS)}
};
return y
}
module.exports = {
cleansing: Estructurador
};