ような in the sentence and how to use?


I'm having problem translating this sentence

> 正直な人が損をするようなことは、あってはいけない.

and more importantly I want to know what ”ような” means exactly in this context,
please give me a short example of ”ような” if possible. I'm also curious what
"あって" means too.

Sorry to bother and thanks in advance.




I'll try to translate the sentence just literally into English.

'There should not be things like an honest person suffer a loss.'

ような in this context means 'like' as a preposition. Hence 'ようなこと' would be
translated to 'things like~ あって is continuous form of the verb ある(to be or to
exist) As opposed to the e.g. below あって sounds very natural.

正直な人が損をするようなことは、'ある'はいけない。 Here in this example'ある' , I intentionally remained
in infinitive form. I can completely understand but conveys a feeling that the
speaker is a novice Japanese learner.

