我尝试仅获取一个具有不同元素的数组,但目前我具有不同的数组...
// ********* SOME CODE *********
var color = [];
var risk = [];
var all_operational = [];
if(Operational.length == group.name.length){
color = "green";
risk = "Operational";
all_operational.push(group.name);
console.log(all_operational);
}
/* console.log(group.name)
OUTPUT: toto
tata
titi
trtr
实际结果(console.log(all_operational):
扩展结果:
答案 0 :(得分:0)
看起来您的 @ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "Offre")
private Offer school;
是一个数组。如果应该这样,则可以使用group.name
方法将all_operational展平。尝试.flat()
。