Join file with awk

I have a problem of joining 2 files with different position of key column

file1

INDIA|LEFT|123
USA|RIGHT|345
CHINA|LEFT|234

file2

123|HIGH
345|LOW

expected output

INDIA|LEFT|123|HIGH
USA|RIGHT|345|LOW
CHINA|LEFT|234|

based on column 3 in file 1 and column 2 in file 2, I want to print file1 plus its value from file2

I did this

awk -F"|" 'FILENAME=="file2"{A[$2]=$2} FILENAME=="file1"{if(A[$3]){print}}' file2 file1

but it keeps fail, lease any help

Try

awk -F"|" 'FNR== NR {A[$1] = $2; next} {print $0, A[$3]}' OFS="|" file2 file1
INDIA|LEFT|123|HIGH
USA|RIGHT|345|LOW
CHINA|LEFT|234|

Hello radius,

Could you please try following and let me know if this helps you(not tested though).

awk 'FNR==NR{A[$1]=$NF;next} ($NF in A){print $0 OFS A[$NF]}' FS=OFS="|" Input_file2 Input_file1

Thanks,
R. Singh